aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.draggable.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-03-08 10:08:46 -0500
committerScott González <scott.gonzalez@gmail.com>2013-03-08 10:08:58 -0500
commitcdff72efed495d7a17c551578079619712758793 (patch)
treeb4e9e964d89989f17158b4d321649a489458f6bd /ui/jquery.ui.draggable.js
parent6358695df18722d8c7e99437365db42cf4957626 (diff)
downloadjquery-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.js14
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) {