mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
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:
4
ui/jquery.ui.mouse.js
vendored
4
ui/jquery.ui.mouse.js
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user