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.

This commit is contained in:
Scott González
2011-08-09 09:32:01 -04:00
parent e827a0e280
commit 7f812f8be9

View 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;
}