From af6520b4b8814bf420e71a20b28a63933356da41 Mon Sep 17 00:00:00 2001 From: Jed Watson Date: Fri, 24 Nov 2017 15:56:04 +1100 Subject: [PATCH] Open menu correctly in input click, fixes #1316 Also fixes #1887 --- src/Select.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Select.js b/src/Select.js index 71fffa37ae..20bdc4ac6e 100644 --- a/src/Select.js +++ b/src/Select.js @@ -216,6 +216,15 @@ class Select extends React.Component { } if (event.target.tagName === 'INPUT') { + if (!this.state.isFocused) { + this._openAfterFocus = this.props.openOnClick; + this.focus(); + } else if (!this.state.isOpen) { + this.setState({ + isOpen: true, + isPseudoFocused: false, + }); + } return; }