Opened 13 years ago

Closed 11 years ago

#5019 closed bug (worksforme)

connectToSortable fails if sortable is applied before element was appended to document

Reported by: FND Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.draggable Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

Steps to reproduce:

  • dynamically construct a list, applying .sortable() before the list is added to the document
  • add draggable elements with connectToSortable targeting this list
  • drag element onto list -- this will fail
  • sort list, then drag element onto list -- this will succeed

Attachments (1)

testcase.html (1.2 KB) - added by FND 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by FND

Attachment: testcase.html added

comment:1 Changed 13 years ago by Scott González

Milestone: TBD1.8

comment:2 Changed 13 years ago by flashylight

At jquery.ui.draggable.js in line 538, it uses this.instance.containerCache , and its values are not updated with the latest.

comment:3 Changed 11 years ago by Scott González

Milestone: 1.9.02.0.0

comment:4 Changed 11 years ago by mikesherov

Resolution: worksforme
Status: newclosed

Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI. http://jsfiddle.net/s8Uhz/2/

If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!

Note: See TracTickets for help on using tickets.