]> source.dussan.org Git - jquery-ui.git/commitdiff
Mouse: Work around a bug in IE 8 where disabled inputs don't have a nodeName. Fixes...
authorScott González <scott.gonzalez@gmail.com>
Tue, 9 Aug 2011 13:32:01 +0000 (09:32 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 9 Aug 2011 13:32:01 +0000 (09:32 -0400)
ui/jquery.ui.mouse.js

index 3e6ead8cd76c595ff340b1d63873f0323896c808..888fbedfed206a79353204e21009bab6e0281294 100644 (file)
@@ -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;
                }