diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-03-08 10:08:46 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-03-08 10:08:58 -0500 |
commit | cdff72efed495d7a17c551578079619712758793 (patch) | |
tree | b4e9e964d89989f17158b4d321649a489458f6bd /ui/jquery.ui.draggable.js | |
parent | 6358695df18722d8c7e99437365db42cf4957626 (diff) | |
download | jquery-ui-cdff72efed495d7a17c551578079619712758793.tar.gz jquery-ui-cdff72efed495d7a17c551578079619712758793.zip |
Draggable: Account for descendants in handle.
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 56b8fc77d..5762d3171 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -281,17 +281,9 @@ $.widget("ui.draggable", $.ui.mouse, { }, _getHandle: function(event) { - - var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; - - this.element.find( this.options.handle ).each(function() { - if(this === event.target) { - handle = true; - } - }); - - return handle; - + return this.options.handle ? + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : + true; }, _createHelper: function(event) { |