Browse Source

#3789 - Fix issue with label click making menu appeaR

pull/3792/head
Jack Lukic 9 years ago
parent
commit
2e5ad7c71c
2 changed files with 7 additions and 5 deletions
  1. 1
      RELEASE-NOTES.md
  2. 11
      src/definitions/modules/dropdown.js

1
RELEASE-NOTES.md

@ -27,6 +27,7 @@
- **Dropdown** - Fixed issue where `get value` would not return correct value when value was blank #3766
- **Dropdown** - Fixed issue where `apiSettings` was not defaulting to use `cache: 'local'` as specified in the docs
- **Dropdown** - Fixed issue where dropdowns with sub-menus would not properly activate on mobile #3183
- **Dropdown** - Fixed issue where dropdown would open when an label delete x was clicked when not using `search selection` #3789
- **Dropdown** - Fixed issue where long dropdown text entry with `allowAdditions` would cause input to mistakingly drop to next line early #3743
- **Form** - Fixed issue where grouped `fields` and `field` would cause different margin collapse, making `fields` include larger gaps between content #3717
- **Form** - Fixed use of deprecated `size()` method in `prompt` #3655 **Thanks @SimonArdrey**

11
src/definitions/modules/dropdown.js

@ -1375,16 +1375,17 @@ $.fn.dropdown = function(parameters) {
},
eventOnElement: function(event, callback) {
var
$target = $(event.target),
$label = $target.closest(selector.siblingLabel),
notOnLabel = ($module.find($label).length === 0),
notInMenu = ($target.closest($menu).length === 0)
$target = $(event.target),
$label = $target.closest(selector.siblingLabel),
inVisibleDOM = document.contains(event.target),
notOnLabel = ($module.find($label).length === 0),
notInMenu = ($target.closest($menu).length === 0)
;
callback = $.isFunction(callback)
? callback
: function(){}
;
if(notOnLabel && notInMenu) {
if(inVisibleDOM && notOnLabel && notInMenu) {
module.verbose('Triggering event', callback);
callback();
return true;

Loading…
Cancel
Save