From c26bb1d59122bbd26084ccece234a63e52820202 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 13 Oct 2018 15:31:15 -0700 Subject: [PATCH] Fixes clearable dropdowns not working when not on:click #6594 --- RELEASE-NOTES.md | 1 + src/definitions/modules/dropdown.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 29db111aec..ca3f448435 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -10,6 +10,7 @@ - **Gulp** - Updated all gulp dependencies to most recent released versions with modifications to tasks as necessary. **Bug Fixes** +- **Dropdown** - `clearable` dropdown now works with dropdown that arent `on:click`, like `hover` or `manual` triggers. #6594 - **Modal** - Fixed `fullscreen modal` having incorrect left offset with flex modals #6587 - **Embed** - Embed will now correctly remove DOM metadata on `destroy` - **Grid** - Fix issue with `very relaxed vertically divided grid` having wrong margins on dividers diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 9af348a553..04da79909b 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -605,7 +605,6 @@ $.fn.dropdown = function(parameters) { else { if(settings.on == 'click') { $module - .on('click' + eventNamespace, selector.icon, module.event.icon.click) .on('click' + eventNamespace, module.event.test.toggle) ; } @@ -621,6 +620,7 @@ $.fn.dropdown = function(parameters) { ; } $module + .on('click' + eventNamespace, selector.icon, module.event.icon.click) .on('mousedown' + eventNamespace, module.event.mousedown) .on('mouseup' + eventNamespace, module.event.mouseup) .on('focus' + eventNamespace, module.event.focus) @@ -1022,7 +1022,7 @@ $.fn.dropdown = function(parameters) { if($icon.hasClass(className.clear)) { module.clear(); } - else { + else if (module.can.click()) { module.toggle(); } }