Skip to main content

Bug Tracker

Side navigation

#1699 closed bug (fixed)

Opened September 20, 2007 07:27PM UTC

Closed December 07, 2007 11:23AM UTC

UI/Droppables javascript errors

Reported by: kopytko Owned by: rworth
Priority: undecided Milestone: 1.2.2
Component: ui 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 September 26, 2007 03:43PM UTC.
Change History (5)

Changed September 23, 2007 12:14PM UTC by paul comment:1

owner: → rworth

Changed September 26, 2007 03:43PM UTC by bartosz.kuzm comment:2

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.

Changed October 02, 2007 11:21AM UTC by rworth comment:3

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.

Changed October 19, 2007 09:00AM UTC by bartosz.kuzm comment:4

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.

}

});

});

Changed December 07, 2007 11:23AM UTC by rworth comment:5

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.