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.
  • Loading branch information
scottgonzalez committed Aug 9, 2011
1 parent e827a0e commit 7f812f8be99bf8dc483b84b12432b61a8e3d59cd
Showing with 3 additions and 1 deletion.
  1. +3 −1 ui/jquery.ui.mouse.js
@@ -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;
}

0 comments on commit 7f812f8

Please sign in to comment.
You can’t perform that action at this time.