Skip to main content

Search and Top Navigation

#1699 closed bug (fixed)

Opened September 20, 2007 07:27PM UTC

Closed December 07, 2007 11:23AM UTC

Last modified February 26, 2009 11:09AM UTC

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 (0)
Change History (7)

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

owner: → rworth

Changed September 26, 2007 03:43PM UTC by bartosz.kuzma 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 rdworth 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.kuzma 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 rdworth 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.

Changed May 24, 2008 03:39AM UTC by comment:6

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed February 26, 2009 11:09AM UTC by paul comment:7

milestone: → 1.5