diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index 690897d548ce..8a9b80ac36e9 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -200,6 +200,19 @@ class BaseOptionsSelector extends Component { this.unSubscribeFromKeyboardShortcut(); } + handleFocusIn() { + const activeElement = document.activeElement; + this.setState({ + disableEnterShortCut: activeElement && this.accessibilityRoles.includes(activeElement.role) && activeElement.role !== CONST.ROLE.PRESENTATION, + }); + } + + handleFocusOut() { + this.setState({ + disableEnterShortCut: false, + }); + } + /** * @param {Array} allOptions * @returns {Number} @@ -266,19 +279,6 @@ class BaseOptionsSelector extends Component { this.props.onChangeText(value); } - handleFocusIn() { - const activeElement = document.activeElement; - this.setState({ - disableEnterShortCut: activeElement && this.accessibilityRoles.includes(activeElement.role) && activeElement.role !== CONST.ROLE.PRESENTATION, - }); - } - - handleFocusOut() { - this.setState({ - disableEnterShortCut: false, - }); - } - subscribeActiveElement() { if (!this.isWebOrDesktop) { return;