Skip to content

Commit b04c6ec

Browse files
Jay Merrifieldscottgonzalez
Jay Merrifield
authored andcommitted
Mouse: Optimize the cancel locator, works around a bug where .add(event.target) in IE8 can take a long time when there are multiple siblings. Fixes #7118 - IE Bug Large ComboBox (Dialog)
(cherry picked from commit 09e88d6)
1 parent b196d1f commit b04c6ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.mouse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $.widget("ui.mouse", {
5858

5959
var self = this,
6060
btnIsLeft = (event.which == 1),
61-
elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
61+
elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false);
6262
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
6363
return true;
6464
}

0 commit comments

Comments
 (0)