Skip to content

Commit d493189

Browse files
authored
fix(dropdown): dont reopen menu on forceselection and search blur
blurring from a search dropdown having forceSelection:true let into reopening, thus focusing, the dropdown again. This was due to calling the item.click function internally without a given event. In such cases the menu should never be opened again
1 parent c245e0f commit d493189

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/definitions/modules/dropdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@
13611361
var
13621362
$choice = $(this),
13631363
$target = event
1364-
? $(event.target)
1364+
? $(event.target || '')
13651365
: $(''),
13661366
$subMenu = $choice.find(selector.menu),
13671367
text = module.get.choiceText($choice),
@@ -1379,7 +1379,7 @@
13791379
module.remove.userAddition();
13801380
}
13811381
module.remove.filteredItem();
1382-
if (!module.is.visible()) {
1382+
if (!module.is.visible() && $target.length > 0) {
13831383
module.show();
13841384
}
13851385
module.remove.searchTerm();

0 commit comments

Comments
 (0)