diff options
author | Jay Merrifield <merrifieldj@pixia.com> | 2011-05-26 23:42:51 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-26 23:44:05 -0400 |
commit | b04c6ece34a57840cce22e8680e9bb7a766994df (patch) | |
tree | 16a6617e4e887f007277b1c063e74c1dbaee8336 /ui/jquery.ui.mouse.js | |
parent | b196d1fb611a4fa627a29e3ff973148ccbe00dfe (diff) | |
download | jquery-ui-b04c6ece34a57840cce22e8680e9bb7a766994df.tar.gz jquery-ui-b04c6ece34a57840cce22e8680e9bb7a766994df.zip |
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 09e88d6220af2f90197c826ac3a31a0ca97f2c8f)
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r-- | ui/jquery.ui.mouse.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 0bd38db85..2fb1389f2 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -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; } |