Ticket #3955 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 5 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r1810.

Note: See TracTickets for help on using tickets.