aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.draggable.js
diff options
context:
space:
mode:
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) {