Browse Source

Prevent the event from firing twice for `.multiple` dropdowns on touch devices. Revert the last commit, because it was a mistake.

pull/5548/head
Andrew Golubev 7 years ago
parent
commit
73afa8ba7f
1 changed files with 5 additions and 1 deletions
  1. 6
      src/definitions/modules/dropdown.js

6
src/definitions/modules/dropdown.js

@ -1219,8 +1219,8 @@ $.fn.dropdown = function(parameters) {
});
module.animate.show(false, $subMenu);
}
event.preventDefault();
}
event.preventDefault();
}
},
@ -1609,6 +1609,7 @@ $.fn.dropdown = function(parameters) {
if( module.can.activate( $(element) ) ) {
module.set.selected(value, $(element));
if(module.is.multiple() && !module.is.allFiltered()) {
event.preventDefault();
return;
}
else {
@ -1625,6 +1626,7 @@ $.fn.dropdown = function(parameters) {
if( module.can.activate( $(element) ) ) {
module.set.value(value, $(element));
if(module.is.multiple() && !module.is.allFiltered()) {
event.preventDefault();
return;
}
else {
@ -1640,11 +1642,13 @@ $.fn.dropdown = function(parameters) {
;
module.set.selected(value, $(element));
module.hideAndClear();
event.preventDefault();
},
hide: function(text, value, element) {
module.set.value(value, text);
module.hideAndClear();
event.preventDefault();
}
},

Loading…
Cancel
Save