1
0
mirror of synced 2024-11-25 06:16:08 +03:00
This commit is contained in:
Igor Vaynberg 2012-07-14 09:23:21 +03:00
parent 5859dc8149
commit 5a73385474

View File

@ -488,11 +488,16 @@
this.highlightUnderEvent(e);
this.selectHighlighted(e);
} else {
killEvent(e);
this.focusSearch();
}
killEvent(e);
}));
// trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
// for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
// dom it will trigger the popup close, which is not what we want
this.dropdown.bind("click mouseup mousedown", function (e) { e.stopPropagation(); });
if ($.isFunction(this.opts.initSelection)) {
// initialize selection based on the current value of the source element
this.initSelection();