]> 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:49 +0000 (09:32 -0400)
(cherry picked from commit 7f812f8be99bf8dc483b84b12432b61a8e3d59cd)

ui/jquery.ui.mouse.js

index 5efa5e63a32adbc7281a536e2167969b53a5f7a8..5bb93e3ab793e51783881b81c7c1eb1279c06a7b 100644 (file)
@@ -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;
                }