From 0e4411cff508bdad6b54f855e843156699d98981 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Tue, 24 Oct 2023 19:15:20 +0200 Subject: [PATCH] remove timeout on search focus --- src/components/OptionsSelector/BaseOptionsSelector.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index 0125fc8e178e..5e37db057db5 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -75,9 +75,7 @@ class BaseOptionsSelector extends Component { this.subscribeToKeyboardShortcut(); if (this.props.isFocused && this.props.autoFocus && this.textInput) { - this.focusTimeout = setTimeout(() => { - this.textInput.focus(); - }, CONST.ANIMATED_TRANSITION); + this.textInput.focus(); } this.scrollToIndex(this.props.selectedOptions.length ? 0 : this.state.focusedIndex, false); @@ -139,10 +137,6 @@ class BaseOptionsSelector extends Component { } componentWillUnmount() { - if (this.focusTimeout) { - clearTimeout(this.focusTimeout); - } - this.unSubscribeFromKeyboardShortcut(); }