Skip to content

Commit 7b60524

Browse files
committed
do not open when clicked on a search choice. fixes select2#336
1 parent 045bff7 commit 7b60524

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

select2.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,10 @@
18571857

18581858
this.container.delegate(selector, "mousedown", this.bind(function (e) {
18591859
if (!this.enabled) return;
1860+
if ($(e.target).closest(".select2-search-choice").length > 0) {
1861+
// clicked inside a select2 search choice, do not open
1862+
return;
1863+
}
18601864
this.clearPlaceholder();
18611865
this.open();
18621866
this.focusSearch();

0 commit comments

Comments
 (0)