Browse Source

Fixes #3917, adds check for bubbled label event coming from surrounding label

pull/3763/merge
Jack Lukic 8 years ago
parent
commit
10e67521a7
1 changed files with 6 additions and 0 deletions
  1. 6
      src/definitions/modules/dropdown.js

6
src/definitions/modules/dropdown.js

@ -1009,6 +1009,9 @@ $.fn.dropdown = function(parameters) {
? module.show
: module.toggle
;
if(module.is.bubbledLabelClick(event)) {
return;
}
if( module.determine.eventOnElement(event, toggleBehavior) ) {
event.preventDefault();
}
@ -2920,6 +2923,9 @@ $.fn.dropdown = function(parameters) {
active: function() {
return $module.hasClass(className.active);
},
bubbledLabelClick: function(event) {
return $(event.target).is('select, input') && $module.closest('label').length > 0;
},
alreadySetup: function() {
return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
},

Loading…
Cancel
Save