]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable, sortable: fixed issue when handle wasn't working with elements nested...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Sat, 7 Jun 2008 23:25:47 +0000 (23:25 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Sat, 7 Jun 2008 23:25:47 +0000 (23:25 +0000)
ui/ui.draggable.js
ui/ui.sortable.js

index 8e670244b57968d98f4a28a6a634ed358129a843..d58e5410074b8873af8ffe423dca6d1c228fc429 100644 (file)
@@ -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;
index a433805e8433d13c4109f2b25bfce7668d4a350b..cbfdd66236ecc635adb21fe45af10edc782e5f48 100644 (file)
@@ -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;
                }