do not leak click events. fixes #1622
This commit is contained in:
parent
e09292d800
commit
fb8bf6d51d
@ -688,15 +688,18 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
this.opts.element
|
||||
.data("select2", this)
|
||||
.attr("tabindex", "-1")
|
||||
.before(this.container);
|
||||
.before(this.container)
|
||||
.on("click.select2", killEvent); // do not leak click events
|
||||
|
||||
this.container.data("select2", this);
|
||||
|
||||
this.dropdown = this.container.find(".select2-drop");
|
||||
|
||||
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
|
||||
|
||||
|
||||
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
|
||||
this.dropdown.data("select2", this);
|
||||
this.dropdown.on("click", killEvent);
|
||||
|
||||
this.results = results = this.container.find(resultsSelector);
|
||||
this.search = search = this.container.find("input.select2-input");
|
||||
@ -708,6 +711,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
// initialize the container
|
||||
this.initContainer();
|
||||
|
||||
this.container.on("click", killEvent);
|
||||
|
||||
installFilteredMouseMove(this.results);
|
||||
this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user