Skip to main content

Search and Top Navigation

#14933 closed bug (notabug)

Opened March 10, 2016 05:24AM UTC

Closed March 11, 2016 03:16PM UTC

Rejecting/preventing drop from greedy droppable doesn't work

Reported by: tilwinjoy Owned by:
Priority: minor Milestone: none
Component: ui.droppable Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:
Description

I have a greedy droppable, and a draggable that reverts when invalid.

If a draggable is dropped on the greedy droppable and the drop was rejected (for example due to a falsy value from `accept, or a different value of scope` option) I expect the draggable to revert back to it's original position because my greedy droppable on which drop occurred decided to reject the drop and parent shouldn't be allowed to capture the element.

But currently the parents captures the element.

Or in other words: When my greedy (I gave it decision power over it's parents) droppable say -"no you should't stay on top of me", the draggable shouldn't stay on top of it with the excuse that it's on top of some parent droppable.

Here is a jsfiddle demo with accept option https://jsfiddle.net/qL0tb12h/1/ and another with scope option in https://jsfiddle.net/qL0tb12h/

A related question in stackoverflow: http://stackoverflow.com/q/35892820/2333214

Attachments (0)
Change History (2)

Changed March 10, 2016 04:20PM UTC by scottgonzalez comment:1

I disagree about your assumptions and think the current behavior is correct. Especially since you can control the reception in nested droppables with the current behaivior, but you couldn't with your proposed change.

Changed March 11, 2016 03:16PM UTC by scottgonzalez comment:2

resolution: → notabug
status: newclosed

I've consulted with the team about this, and my previous comment stands.