Skip to content
Permalink
Browse files
Mouse: Work around a bug in IE 8 where disabled inputs don't have a n…
…odeName. Fixes #7620 - Mouse: Error in IE 8 with disabled inputs.

(cherry picked from commit 7f812f8)
  • Loading branch information
scottgonzalez committed Aug 9, 2011
1 parent 3e98e73 commit c5799b51415cd6c855a05028bf55abe69f570313
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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;
}

0 comments on commit c5799b5

Please sign in to comment.