mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
draggable, sortable: fixed issue when handle wasn't working with elements nested in the handle (fixes #2937)
This commit is contained in:
parent
47e04b888d
commit
68d37568e0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user