Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse: Optimize the cancel locator, Fixes #7118 #309

Closed
wants to merge 3 commits into from
Next Next commit
Mouse: Optimize the cancel locator, works around a bug where .add(eve…
…nt.target) in IE8 can take a long time when there are multiple siblings, Fixes #7118 - IE Bug Large ComboBox (Dialog)
  • Loading branch information
Jay Merrifield committed May 18, 2011
commit 9001f262af31ea728f93acd457e809a0b53aa0ca
2 changes: 1 addition & 1 deletion ui/jquery.ui.mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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).parents(this.options.cancel).add($(event.target)).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
Expand Down