Ticket #2718 (closed bug: worksforme)
draggable connectToSortable causes "no properties" error
| Reported by: | DanSherman | Owned by: | paul |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | ui | Version: | 1.2.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Using jquery-1.2.4a.js & jquery.ui-all-1.5b2.js the code bellow causes a "inst.placeholder has no properties" error on execution of this line. inst.placeholder.remove();
The issue accurs when a dragable div is selected from div.f_obj_temp an hovered over div.f_page, but not dropped. As soon as the draggable is moved outside the bounds of div.f_page the error occurs. when the helper is finally dropped, it holds it's positions and is not selectable for future dragging. The last part can be worked around by manually removing it inside the sortable stop function.
one possible improvement i can think of would be to allow connection to multiple sortables so that the draggable could be dropped in any of the locations.
If need be please let me know, and i can provide a working example of the issue.
$("#temps > .f_obj_temp").draggable({
helper: 'clone', opacity: 0.8, cursorAt: [0,0], connectToSortable: '.f_page', containment: '#the_main_table', appendTo: 'body'
});
$('#inner_form > .f_page').sortable({
containment: 'parent', appendTo: 'body', axis: 'y', opacity: 0.8, start: function(ev,ui){
$('#trash').empty(); $('#trash').html("Started");
}
});
-Dan S
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
