diff --git a/src/Select.js b/src/Select.js index b4931cd82e..cfc4bcddbb 100644 --- a/src/Select.js +++ b/src/Select.js @@ -285,19 +285,19 @@ class Select extends React.Component { if (this.props.disabled || (event.type === 'mousedown' && event.button !== 0)) { return; } - // If the menu isn't open, let the event bubble to the main handleMouseDown - if (!this.state.isOpen) { + + if (this.state.isOpen) { + // prevent default event handlers + event.stopPropagation(); + event.preventDefault(); + // close the menu + this.closeMenu(); + } else { + // If the menu isn't open, let the event bubble to the main handleMouseDown this.setState({ isOpen: true, }); } - // prevent default event handlers - event.stopPropagation(); - event.preventDefault(); - // close the menu - if(this.state.isOpen){ - this.closeMenu(); - } } handleMouseDownOnMenu (event) {