aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-09 09:32:01 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-09 09:32:01 -0400
commit7f812f8be99bf8dc483b84b12432b61a8e3d59cd (patch)
treea1115d757b61f116969b1c885f8223dcb4d6c303 /ui/jquery.ui.mouse.js
parente827a0e280c5652a3f49cea9abf35ccbb9939bda (diff)
downloadjquery-ui-7f812f8be99bf8dc483b84b12432b61a8e3d59cd.tar.gz
jquery-ui-7f812f8be99bf8dc483b84b12432b61a8e3d59cd.zip
Mouse: Work around a bug in IE 8 where disabled inputs don't have a nodeName. Fixes #7620 - Mouse: Error in IE 8 with disabled inputs.
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 3e6ead8cd..888fbedfe 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -59,7 +59,9 @@ $.widget("ui.mouse", {
var self = this,
btnIsLeft = (event.which == 1),
- elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false);
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}