Opened 7 years ago

Closed 7 years ago

#11221 closed bug (notabug)

Drop between two adjacent containers

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



There are two droppable adjucent green divs without margin, border and padding. And orange draggable div.

If you move slowly orange div vertically from the first div to the second, there will be position where none of the divs are hovered (blue background indicates hover state).

I think that it is wrong since there is no visual gap between the divs.

Tested in latest Chrome, FF and IE11.

Change History (4)

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

Owner: set to parshin
Status: newpending
Summary: Drop between two adjacent containersDroppable: Intersection detection off by 1pxDetection between two adjacent containers

That's because tolerance: "intersect" requires at least 50% overlap. So do you want both active or neither active? If you want exactly one active the whole time, increase the draggable element by 1 pixels.

comment:2 Changed 7 years ago by Scott González

Summary: Droppable: Intersection detection off by 1pxDetection between two adjacent containersDrop between two adjacent containers

Sorry, I started changing the title, but then stopped. I've changed it back until we hear back from the reporter.

comment:3 Changed 7 years ago by parshin

Status: pendingnew

I want exactly one active whole time.

But you are right - it is very unclear what is the correct behavior if we say about "at least 50% overlap". It wasn't obvious for me before your answer, thanks!

Odd width and height is nice solution, but sometimes it is difficult to control container size with pixels precision...

If we talk about pixels, we can say "central pixel of draggable should be inside droppable". This statement is very close to definition of "tolerance:intersect", but it uniquely selects one of adjacent containers. But I'm not sure that central pixel is better then 50% overlap in general and not sure that my case with adjacent divs is very important.

Thanks again for clarification!

comment:4 Changed 7 years ago by Scott González

Resolution: notabug
Status: newclosed

Sounds like you probably just want to use a different tolerance, perhaps "pointer".

Note: See TracTickets for help on using tickets.