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:49 -0400
commitc5799b51415cd6c855a05028bf55abe69f570313 (patch)
treefdd7e2119cc744f21ea4b30e4afc179b11d57741 /ui/jquery.ui.mouse.js
parent3e98e737725ef247b765406330dfadf9e28ee049 (diff)
downloadjquery-ui-c5799b51415cd6c855a05028bf55abe69f570313.tar.gz
jquery-ui-c5799b51415cd6c855a05028bf55abe69f570313.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.
(cherry picked from commit 7f812f8be99bf8dc483b84b12432b61a8e3d59cd)
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 5efa5e63a..5bb93e3ab 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -58,7 +58,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;
}