fred icon indicating copy to clipboard operation
fred copied to clipboard

Dropzone bug: New element being dragged does not activate the closest dropzone position.

Open muzzwood opened this issue 4 years ago • 6 comments

Hi! This has been a problem for a while but only just realised there isn't an issue for it yet.

When dragging an element to a dropzone that has at least one element already in it, you normally want the dropzone to activate at the position that is closest to your mouse cursor (while dragging). This is not happening - it usually activates at the top of the dropzone which is often nowhere near the mouse cursor. It usually takes a lot of jiggling the mouse around the area to get it to activate.

Here's a gif demonstrating the problem: ezgif com-video-to-gif

As you can see, I'm trying to drop an image under the block of text. It keeps activating at the position above. At one point all the elements in the dropzone start bouncing around - at this moment it's actually activating at the very top of the dropzone on and off. It's only when I make a circular motion with the mouse that the correct position activates allowing me to drop the element.

This occurs in both Firefox and Chrome (I haven't tried other browsers).

muzzwood avatar Aug 23 '20 06:08 muzzwood

Some further info on this one: It seems to only be a problem like this when trying to add an element at the bottom of the dropzone.

It works perfectly when trying to drop an element at any other position in the dropzone. Or if the dropzone has no other elements it works too.

muzzwood avatar Aug 27 '20 05:08 muzzwood

More on this: If the dropzone takes up 100% of the page vertically, it's not possible to drag an element to the bottom position. It's almost as though the activation point is off screen to the bottom. Perhaps this is caused by one of the other activation points activating above and pushing the rest of the page down...

muzzwood avatar Oct 07 '20 06:10 muzzwood

+1 I am also seeing this when using both Chrome and Firefox in Windows 10. Dragging it around a few times seems to make it work.

qodo avatar Oct 15 '20 17:10 qodo

Not that I have much to add unfortunately, but is this by chance at the bottom of your page? I mostly have seen this at the end or top and not as much in the middle.

matdave avatar Dec 31 '20 16:12 matdave

I think part of the issue may be a fix to another issue. I noticed in the gif you are sticking to the left, which is putting it on top. I would guess that if you went towards the right it would go on bottom. I think this may be related to a fix we did to better support flex grids, where "left approach" favors top and "right approach" favors bottom.

left vs. right approaches

matdave avatar Dec 31 '20 16:12 matdave

Hi @matdave ,

Yes, that's exactly it! Sorry I hadn't realised that earlier.

If dragged from the right side, the activation occurs at the bottom. If dragged from the left it appears at the top. Thus the difficulty of placing an element below something else.

This is a bit counter-intuitive considering everything is dragged from the menu on the left.

It would be better in my mind to have activation occur above if the cursor is over the top half of the element, and activate below if over the bottom half of the element. I appreciate this is a fix so it might be tough, but hopefully another way can be found! :)

muzzwood avatar Jan 01 '21 05:01 muzzwood