diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 3e6ead8cd76..342b5247679 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -59,7 +59,7 @@ $.widget("ui.mouse", { var self = this, btnIsLeft = (event.which == 1), - elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false); + elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().length && $(event.target).closest(this.options.cancel).length : false); if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { return true; }