Skip to content

Commit

Permalink
Mouse: Work around a bug in IE 8 where disabled inputs don't have a n…
Browse files Browse the repository at this point in the history
…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 c5799b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/jquery.ui.mouse.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit c5799b5

Please sign in to comment.