diff options
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r-- | ui/jquery.ui.mouse.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 0bd38db85..582eaf9c0 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -18,6 +18,7 @@ $(document).mousedown(function(e) { }); $.widget("ui.mouse", { + version: "@VERSION", options: { cancel: ':input,option', distance: 1, @@ -58,7 +59,7 @@ $.widget("ui.mouse", { var self = this, btnIsLeft = (event.which == 1), - elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false); + elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).closest(this.options.cancel).length : false); if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { return true; } |