We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5859dc8 commit 5a73385Copy full SHA for 5a73385
1 file changed
select2.js
@@ -488,11 +488,16 @@
488
this.highlightUnderEvent(e);
489
this.selectHighlighted(e);
490
} else {
491
- killEvent(e);
492
this.focusSearch();
493
}
+ killEvent(e);
494
}));
495
496
+ // trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
497
+ // for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
498
+ // dom it will trigger the popup close, which is not what we want
499
+ this.dropdown.bind("click mouseup mousedown", function (e) { e.stopPropagation(); });
500
+
501
if ($.isFunction(this.opts.initSelection)) {
502
// initialize selection based on the current value of the source element
503
this.initSelection();
0 commit comments