From 13520e31111e89181b3d3e76d70e8424781c79bb Mon Sep 17 00:00:00 2001 From: Tobias Andersen Date: Wed, 2 Aug 2017 18:34:52 +0200 Subject: [PATCH] Fix bug where dropdowns don't close (#1548) --- components/dropdown/Dropdown.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/dropdown/Dropdown.js b/components/dropdown/Dropdown.js index 075bb086..dce8e648 100644 --- a/components/dropdown/Dropdown.js +++ b/components/dropdown/Dropdown.js @@ -130,7 +130,6 @@ const factory = (Input) => { const client = event.target.getBoundingClientRect(); const screenHeight = window.innerHeight || document.documentElement.offsetHeight; const up = this.props.auto ? client.top > ((screenHeight / 2) + client.height) : false; - if (this.inputNode) this.inputNode.blur(); this.setState({ active: true, up }); }; @@ -207,6 +206,7 @@ const factory = (Input) => { data-react-toolbox="dropdown" onBlur={this.handleBlur} onFocus={this.handleFocus} + tabIndex="-1" > { onClick={this.handleClick} required={this.props.required} readOnly - ref={(node) => { this.inputNode = node && node.getWrappedInstance(); }} type={template && selected ? 'hidden' : null} theme={theme} themeNamespace="input"