We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36dc6e8 + 6664add commit dfabd83Copy full SHA for dfabd83
1 file changed
src/ReactSelectize.js
@@ -147,9 +147,17 @@
147
return this$.props.onFocus(e);
148
});
149
}, ref$.onBlur = function(e){
150
- if (this$.refs.dropdownMenu && document.activeElement === findDOMNode(this$.refs.dropdownMenu)) {
151
- return;
+ dropdownDOMNode = findDOMNode(this$.refs.dropdownMenu);
+
152
+ if (dropdownDOMNode) {
153
+ const dropDownClassName = dropdownDOMNode.classList[0];
154
+ if (document.activeElement.isEqualNode(dropdownDOMNode)) {
155
+ return;
156
+ } else if (!!document.querySelector(`.${dropDownClassName}:hover`)) {
157
+ return this$.refs.search.focus();
158
+ }
159
}
160
161
return this$.closeDropdown(function(){
162
return this$.props.onBlur(e);
163
0 commit comments