Skip to content
Permalink
Browse files

draggable, sortable: fixed issue when handle wasn't working with elem…

…ents nested in the handle (fixes #2937)
  • Loading branch information
Paul Bakaus
Paul Bakaus committed Jun 7, 2008
1 parent 47e04b8 commit 68d37568e0041290f3c957891c2c2919cd504f0f
Showing with 4 additions and 2 deletions.
  1. +3 −1 ui/ui.draggable.js
  2. +1 −1 ui/ui.sortable.js
@@ -36,7 +36,9 @@ $.widget("ui.draggable", $.extend($.ui.mouse, {
if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle')) return false;

var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
if(!handle) $(this.options.handle, this.element).each(function() {


$(this.options.handle, this.element).find("*").andSelf().each(function() {
if(this == e.target) handle = true;
});
if (!handle) return false;
@@ -295,7 +295,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
if(!currentItem) return false;
if(this.options.handle && !overrideHandle) {
var validHandle = false;
$(this.options.handle, currentItem).each(function() { if(this == e.target) validHandle = true; });
$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; });
if(!validHandle) return false;
}

0 comments on commit 68d3756

Please sign in to comment.
You can’t perform that action at this time.