aboutsummaryrefslogtreecommitdiffstats
path: root/ui/draggable.js
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2014-07-15 13:38:00 -0400
committerTJ VanToll <tj.vantoll@gmail.com>2014-07-15 15:49:00 -0400
commit7594a3142547e078326872cb0d6e2d7f32f4c808 (patch)
tree99a3499c9c2517bdd2dab111e5e79ebe37b0e552 /ui/draggable.js
parent2447cabd598ed4b58587fa5054a0c9f7b9bd9bd6 (diff)
downloadjquery-ui-7594a3142547e078326872cb0d6e2d7f32f4c808.tar.gz
jquery-ui-7594a3142547e078326872cb0d6e2d7f32f4c808.zip
Draggable: Only apply ui-draggable-handle within the draggable instance
Fixes #10212 Closes gh-1284
Diffstat (limited to 'ui/draggable.js')
-rw-r--r--ui/draggable.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/draggable.js b/ui/draggable.js
index c27fc8733..cd87ad2fc 100644
--- a/ui/draggable.js
+++ b/ui/draggable.js
@@ -314,8 +314,10 @@ $.widget("ui.draggable", $.ui.mouse, {
},
_setHandleClassName: function() {
+ var handle = this.options.handle ?
+ this.element.find( this.options.handle ) : this.element;
this._removeHandleClassName();
- $( this.options.handle || this.element ).addClass( "ui-draggable-handle" );
+ handle.addClass( "ui-draggable-handle" );
},
_removeHandleClassName: function() {