Skip to content
Browse files

replace parents() with closest() since we only care about the first o…

…ccurance
  • Loading branch information...
1 parent 5ecde33 commit a241b91b4742ee5a147e55560d81c992db10a555 @fracmak committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.mouse.js
View
2 ui/jquery.ui.mouse.js
@@ -58,7 +58,7 @@ $.widget("ui.mouse", {
var self = this,
btnIsLeft = (event.which == 1),
- elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents(this.options.cancel).length : false);
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || $(event.target).is(this.options.cancel) || !this._mouseCapture(event)) {
return true;
}

0 comments on commit a241b91

Please sign in to comment.
Something went wrong with that request. Please try again.