From 06a2471f470333b7a2fac2a84646fffc545b3bca Mon Sep 17 00:00:00 2001 From: Yevhenii Voloshchak Date: Mon, 18 Jul 2022 22:13:29 +0300 Subject: [PATCH] Fix issue with dropdown opening when enter is pressed --- src/components/Button.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Button.js b/src/components/Button.js index 3f3c646eb1c0..17e1d7e007c1 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -159,6 +159,7 @@ class Button extends Component { if (!this.props.isFocused || this.props.isDisabled || this.props.isLoading || (e && e.target.nodeName === 'TEXTAREA')) { return; } + e.preventDefault(); this.props.onPress(); }, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true, false, this.props.enterKeyEventListenerPriority, false); }