Skip to content

Commit

Permalink
Merging furqanZafar#194
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdevel committed Jan 5, 2021
1 parent 36dc6e8 commit d7e2720
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ReactSelectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,23 @@
return this$.props.onFocus(e);
});
}, ref$.onBlur = function(e){
/*
if (this$.refs.dropdownMenu && document.activeElement === findDOMNode(this$.refs.dropdownMenu)) {
return;
}
*/

dropdownDOMNode = findDOMNode(this$.refs.dropdownMenu);

if (dropdownDOMNode) {
const dropDownClassName = dropdownDOMNode.classList[0];
if (document.activeElement.isEqualNode(dropdownDOMNode)) {
return;
} else if (!!document.querySelector(`.${dropDownClassName}:hover`)) {
return this$.refs.search.focus();
}
}

return this$.closeDropdown(function(){
return this$.props.onBlur(e);
});
Expand Down

0 comments on commit d7e2720

Please sign in to comment.