mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
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)
This commit is contained in:
committed by
Scott González
parent
e34dbfeef0
commit
09e88d6220
2
ui/jquery.ui.mouse.js
vendored
2
ui/jquery.ui.mouse.js
vendored
@@ -58,7 +58,7 @@ $.widget("ui.mouse", {
|
||||
|
||||
var self = this,
|
||||
btnIsLeft = (event.which == 1),
|
||||
elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
|
||||
elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false);
|
||||
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user