Browse Source

Fix #1638, bubbled click event on item now only blocks callback not other events

pull/1698/merge
jlukic 9 years ago
parent
commit
bfbda5fa35
1 changed files with 3 additions and 6 deletions
  1. 9
      src/definitions/modules/dropdown.js

9
src/definitions/modules/dropdown.js

@ -672,13 +672,10 @@ $.fn.dropdown = function(parameters) {
module.remove.searchTerm(); module.remove.searchTerm();
module.determine.selectAction(text, value); module.determine.selectAction(text, value);
}, },
hasSubMenu = ($subMenu.length > 0),
isSubMenuItem = ($subMenu.find($target).length > 0)
hasSubMenu = ($subMenu.length > 0),
isBubbledEvent = ($subMenu.find($target).length > 0)
; ;
if(isSubMenuItem) {
return false;
}
if(!hasSubMenu || settings.allowCategorySelection) {
if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) {
callback(); callback();
} }
} }

Loading…
Cancel
Save