aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Merrifield <merrifieldj@pixia.com>2011-05-26 23:42:51 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-26 23:42:51 -0400
commit09e88d6220af2f90197c826ac3a31a0ca97f2c8f (patch)
tree17cc699db3bc94e45336b03f87f9c237bcd49af4
parente34dbfeef013313dead74e39bea8adaa848310d4 (diff)
downloadjquery-ui-09e88d6220af2f90197c826ac3a31a0ca97f2c8f.tar.gz
jquery-ui-09e88d6220af2f90197c826ac3a31a0ca97f2c8f.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)
-rw-r--r--ui/jquery.ui.mouse.js2
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;
}