Ticket #30998: 30998.patch
| File 30998.patch, 1.6 KB (added by , 11 years ago) |
|---|
-
wp-includes/js/jquery/ui/draggable.js
766 766 }); 767 767 }, 768 768 drag: function( event, ui, draggable ) { 769 770 var that = this; 771 769 772 $.each( draggable.sortables, function() { 770 773 var innermostIntersecting = false, 771 774 sortable = this; … … 799 802 // so that the move-in stuff gets fired only once. 800 803 if ( !sortable.isOver ) { 801 804 sortable.isOver = 1; 805 //Now we fake the start of dragging for the sortable instance, 806 //by cloning the list group item, appending it to the sortable and using it as draggable.currentItem 807 //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) 808 sortable.currentItem = $(that).clone().removeAttr("id").appendTo(sortable.element).data("ui-sortable-item", true); 802 809 803 sortable.currentItem = ui.helper804 .appendTo( sortable.element )805 .data( "ui-sortable-item", true );806 807 810 // Store helper option to later restore it 808 811 sortable.options._helper = sortable.options.helper; 809 812 … … 872 875 sortable.options.revert = sortable.options._revert; 873 876 sortable.options.helper = sortable.options._helper; 874 877 878 //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size 879 sortable.currentItem.remove(); 875 880 if ( sortable.placeholder ) { 876 881 sortable.placeholder.remove(); 877 882 }