Skip to content

Commit

Permalink
fix(dropdown): Fix for menu bubbling fomantic#190 again. Introduced by
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de committed Nov 10, 2018
1 parent 3f7bc5d commit 067f766
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ $.fn.dropdown = function(parameters) {
? callback
: function(){}
;
if( module.is.active() && !module.is.animatingOutward() ) {
if(module.is.active() && !module.is.animatingOutward() ) {
module.debug('Hiding dropdown');
if(settings.onHide.call(element) !== false) {
module.animate.hide(function() {
Expand Down Expand Up @@ -1082,13 +1082,13 @@ $.fn.dropdown = function(parameters) {
if(settings.showOnFocus){
module.focusSearch();
} else {
module.toggle();
module.toggle();
}
} else {
module.blurSearch();
module.blurSearch();
}
} else {
module.toggle();
module.toggle();
}
}
},
Expand Down Expand Up @@ -1268,7 +1268,9 @@ $.fn.dropdown = function(parameters) {
isBubbledEvent = ($subMenu.find($target).length > 0)
;
// prevents IE11 bug where menu receives focus even though `tabindex=-1`
$(document.activeElement).blur();
if (!module.has.search() || !document.activeElement.isEqualNode($search[0])){
$(document.activeElement).blur();
}
if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) {
if(module.is.searchSelection()) {
if(settings.allowAdditions) {
Expand Down

0 comments on commit 067f766

Please sign in to comment.