diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index b20104790..044f72111 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -21,6 +21,8 @@ **Bugs** - **Divider/Step/Modal/AD** - Fixes 1px jump at `@mobileBreakpoint` caused by incorrect edge conditions in media query #3180 **THanks @mdehoog** - **Dimmer** - Dimmer can now works correctly with `opacity: 0` #3167 **Thanks @mdehoog** +- **Dropdown** - Fixed condition where focusing on dropdown would show a blank menu when "no results" was reached and the dropdown was refocused +- **Dropdown** - Search dropdowns will now correctly filter by current search term on re-focus - **Dropdown** - Fixed issue where tabindex was being removed incorrectly with `selection dropdown` in some cases. #3002 - **Dropdown** - Added `remoteValues` as a possible `field` setting. Allowing users to return API results using arbitrary JSON object groupings. #3080 - **Dropdown** - Added ability to pass in `keys` as a setting, to avoid issues with languages where comma delimiter may be a different keycode #3016 diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 399706968..80a7dae0e 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -413,7 +413,7 @@ $.fn.dropdown = function(parameters) { if(module.is.multiple() && !module.has.search() && module.is.allFiltered()) { return true; } - if(module.has.message() && !module.has.maxSelections()) { + if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) { module.remove.message(); } if(settings.onShow.call(element) !== false) { @@ -791,13 +791,17 @@ $.fn.dropdown = function(parameters) { : $activeItem, hasSelected = ($selectedItem.size() > 0) ; - if( hasSelected && module.has.query() ) { - module.debug('Forcing partial selection to selected item', $selectedItem); - module.event.item.click.call($selectedItem); - } - else { - module.hide(); + if( module.has.query() ) { + if(hasSelected) { + module.debug('Forcing partial selection to selected item', $selectedItem); + module.event.item.click.call($selectedItem); + return; + } + else { + module.remove.searchTerm(); + } } + module.hide(); }, event: { @@ -842,6 +846,7 @@ $.fn.dropdown = function(parameters) { module.remove.activeLabel(); } if(settings.showOnFocus) { + module.search(); module.show(); } },