mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00: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.
(cherry picked from commit 7f812f8be9
)
This commit is contained in:
parent
3e98e73772
commit
c5799b5141
4
ui/jquery.ui.mouse.js
vendored
4
ui/jquery.ui.mouse.js
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user