#1699 closed bug (fixed)
UI/Droppables javascript errors
Reported by: | kopytko | Owned by: | rdworth |
---|---|---|---|
Priority: | blocker | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
There's an error in UI/Droppables. I'm using Firefox 2.0.0.7 on Windows XP Home SP2. When I try to drag draggable element I get an error: oDrag.helperSize has no properties in ui.droppable.js (line 169)
The same error occurs on IE7.
Attachments (1)
Change History (8)
comment:1 Changed 16 years ago by
Owner: | set to rworth |
---|
Changed 16 years ago by
Attachment: | ui-error.JPG added |
---|
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
Status: | new → assigned |
---|
I added a test page: http://dev.jquery.com/view/trunk/plugins/ui/tests/1699.html but am not able to reprodcue the error.
comment:4 Changed 15 years ago by
Well, this function is able to reproduce the error. But it seems that I didn't it properly. I removed element without destroying instance of draggable and droppable connected with this element.
$(document).ready(function(){
$('li').draggable({revert:true}).droppable({
accept: 'li', drop: function(ev, ui) {
var draggable = ui.draggable.element;
Uncomment these lines and the error
will not occur.
$(draggable).draggableInstance().destroy();
$(draggable).droppableInstance().destroy();
$(draggable).remove();
... do some operations ...
recreate element here.
}
});
});
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in rev4069. It now works to call $(draggable).remove(); inside the drop callback if you call draggableDestroy() and droppableDestroy() beforehand.
comment:7 Changed 14 years ago by
Milestone: | → 1.5 |
---|
I got the same error when I remove droppable/draggable li element from ul list, and recreate it in other list with the same id and properties. In attachment screenshot form Firebug with error that always occurs immediately before error in ui.droppable.js.