Skip to content

Commit

Permalink
Open menu correctly in input click, fixes JedWatson#1316
Browse files Browse the repository at this point in the history
Also fixes JedWatson#1887
  • Loading branch information
JedWatson committed Nov 24, 2017
1 parent 55ef43b commit af6520b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit af6520b

Please sign in to comment.