Skip to main content

Search and Top Navigation

#9955 open bug ()

Opened March 30, 2014 10:31PM UTC

Last modified March 06, 2015 12:38PM UTC

Droppable: Nested droppables hover behavior is incorrect

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

Take 3 containers that are nested, C1, C2, C3. All are draggable and droppable.

1. Start dragging C2 and keep within C1, C1 hoverClass is applied

2. Start dragging C3 and keep within C2, C2 hoverClass is applied

3. Start dragging C2, *BUG* C1 hoverClass is not applied

EXPECTED BEHAVIOR:

At step 3, hoverClass should be reapplied to C1

You can try this here:

http://jsfiddle.net/samhatoum/YnWc2/296/

Attachments (0)
Change History (3)

Changed March 31, 2014 12:42PM UTC by tj.vantoll comment:1

status: newopen
summary: Nested droppables hover behavior is incorrectDroppable: Nested droppables hover behavior is incorrect

Confirmed against master: http://jsfiddle.net/tj_vantoll/X2hTW/.

I thought this had come up before and came down to caching of some sorts in the ddmanager, but I can't find a duplicate. This example works fine if the droppables are not greedy.

Changed March 06, 2015 12:24PM UTC by sgerace comment:2

I ran into this behavior as well while working with ui.droppable.

The particulars of my case can be seen here: http://jsfiddle.net/xopdL0df/3/

In this case, if you drag C1 over D2 (the child) you will first see D1 (the parent) light up, and then the D2 light up. If you then drop C1 onto the D2 you'll notice D2's counter increase (as expected). However, if you attempt the same thing again, when you move C1 over D1, it will not light up (*BUG*). If you continue to drag C1 over D2 and then back over D1, the over event on D1 resumes correct behavior.

I'm guessing that this behavior is caused by the same bug.

Changed March 06, 2015 12:38PM UTC by sgerace comment:3

_comment0: So, never mind, after posting my previous comment I found #10111 and after looking through the code and the provided PR, it would seem that the behavior that I was seeing was actually related to that issue instead. I applied the PR provided for #10111locally and everything now works properly. \ \ I will leave my previous comment for informational purposes (in case someone else runs into the same problem and finds this ticket instead of #10111), but feel free to delete if you don't feel that it adds value. 1425645511207498

So, never mind, after posting my previous comment I found #10111 and after looking through the code and the provided PR, it would seem that the behavior that I was seeing was actually related to that issue instead. I applied the PR provided for #10111 locally and everything now works properly.

I will leave my previous comment for informational purposes (in case someone else runs into the same problem and finds this ticket instead of #10111), but feel free to delete if you don't feel that it adds value.