Opened 16 years ago

Closed 15 years ago

Last modified 14 years ago

#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)

ui-error.JPG (160.2 KB) - added by bartosz.kuzma 16 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 16 years ago by paul

Owner: set to rworth

Changed 16 years ago by bartosz.kuzma

Attachment: ui-error.JPG added

comment:2 Changed 16 years ago by bartosz.kuzma

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.

comment:3 Changed 16 years ago by rdworth

Status: newassigned

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 bartosz.kuzma

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 rdworth

Resolution: fixed
Status: assignedclosed

Fixed in rev4069. It now works to call $(draggable).remove(); inside the drop callback if you call draggableDestroy() and droppableDestroy() beforehand.

comment:6 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:7 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.