diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 4191ce3f87..41ad4db304 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -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() { @@ -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(); } } }, @@ -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) {