Browse Source

Better fix for search input blur bug

pull/1191/head
jlukic 10 years ago
parent
commit
09f8ff0054
1 changed files with 8 additions and 2 deletions
  1. 10
      src/definitions/modules/dropdown.js

10
src/definitions/modules/dropdown.js

@ -306,6 +306,7 @@ $.fn.dropdown = function(parameters) {
; ;
} }
$module $module
.on('mousedown' + eventNamespace, selector.item, module.event.item.mousedown)
.on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter) .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
.on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave) .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
.on('click' + eventNamespace, selector.item, module.event.item.click) .on('click' + eventNamespace, selector.item, module.event.item.click)
@ -408,8 +409,9 @@ $.fn.dropdown = function(parameters) {
module.show(); module.show();
}, },
searchBlur: function(event) { searchBlur: function(event) {
// give enough time for events to bubble
setTimeout(module.hide, 50);
if(!activated) {
module.hide();
}
}, },
input: function(event) { input: function(event) {
var var
@ -527,6 +529,10 @@ $.fn.dropdown = function(parameters) {
item: { item: {
mousedown: function() {
activated = true;
},
mouseenter: function(event) { mouseenter: function(event) {
var var
$currentMenu = $(this).find(selector.menu), $currentMenu = $(this).find(selector.menu),

Loading…
Cancel
Save