Opened 6 years ago

Closed 6 years ago

#9639 closed bug (duplicate)

Droppable: changing the scope does not update the ddmanager

Reported by: NiGhTTraX Owned by:
Priority: minor Milestone: none
Component: ui.droppable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

When changing the scope option of a droppable using droppable("option", "scope", "new"), the droppable will not accept draggables with the correct scope value. This is caused by the fact that the ddmanager is not updated once the scope value changes.

Here is a fiddle showing the bug http://jsfiddle.net/NiGhTTraX/9LwFU/

Expected: After clicking the button, the black draggables can be dropped on the droppables, while the red draggable can't.

Actual: After clicking the button, the black draggables can't be dropped on the droppables, while the red draggable can (this is an indication that the ddmanager still manages the default scope, instead of the new value).

I'll attach my proposed patch in a comment so I can link the ticket number in the pull request.

I had to move some code around to prevent code duplication. I've also included a test in droppable_options.js that replaces the old and unimplemented scope test.

Change History (2)

comment:1 Changed 6 years ago by NiGhTTraX

comment:2 Changed 6 years ago by tj.vantoll

Resolution: duplicate
Status: newclosed

Duplicate of #9287.

Note: See TracTickets for help on using tickets.