Skip to content

Commit c26bb1d

Browse files
committed
Fixes clearable dropdowns not working when not on:click #6594
1 parent 36d5857 commit c26bb1d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- **Gulp** - Updated all gulp dependencies to most recent released versions with modifications to tasks as necessary.
1111

1212
**Bug Fixes**
13+
- **Dropdown** - `clearable` dropdown now works with dropdown that arent `on:click`, like `hover` or `manual` triggers. #6594
1314
- **Modal** - Fixed `fullscreen modal` having incorrect left offset with flex modals #6587
1415
- **Embed** - Embed will now correctly remove DOM metadata on `destroy`
1516
- **Grid** - Fix issue with `very relaxed vertically divided grid` having wrong margins on dividers

src/definitions/modules/dropdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ $.fn.dropdown = function(parameters) {
605605
else {
606606
if(settings.on == 'click') {
607607
$module
608-
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
609608
.on('click' + eventNamespace, module.event.test.toggle)
610609
;
611610
}
@@ -621,6 +620,7 @@ $.fn.dropdown = function(parameters) {
621620
;
622621
}
623622
$module
623+
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
624624
.on('mousedown' + eventNamespace, module.event.mousedown)
625625
.on('mouseup' + eventNamespace, module.event.mouseup)
626626
.on('focus' + eventNamespace, module.event.focus)
@@ -1022,7 +1022,7 @@ $.fn.dropdown = function(parameters) {
10221022
if($icon.hasClass(className.clear)) {
10231023
module.clear();
10241024
}
1025-
else {
1025+
else if (module.can.click()) {
10261026
module.toggle();
10271027
}
10281028
}

0 commit comments

Comments
 (0)