Skip to main content

Search and Top Navigation

#3955 closed bug (fixed)

Opened January 27, 2009 11:30AM UTC

Closed January 27, 2009 02:58PM UTC

droppable: accept function - 'this' context should be DOMElement, not jQuery object

Reported by: rdworth Owned by:
Priority: blocker Milestone: 1.7
Component: ui.droppable Version: 1.6rc5
Keywords: Cc:
Blocked by: Blocking:
Description

When you provide a callback function to the droppable accept option (as opposed to a selector), like so

$("#droppable").droppable({

accept: function(draggable) {

console.log(this);

}

});

'this' needs to be a DOMElement (in this case #droppable). It is currently a jQuery Object containing that DOMElement. This is in keeping with the jQuery and jQuery UI pattern of always having the context of a callback function be a DOMElement, the same to which the event was bound.

Attachments (0)
Change History (1)

Changed January 27, 2009 02:58PM UTC by paul comment:1

resolution: → fixed
status: newclosed

Fixed in r1810.