bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

html and body having height 100% causes inability to drag items that are outside the viewport to start with #662

Open danturn opened 3 years ago

danturn commented 3 years ago

Hiya,

Having some issues with dragula on IOS

Seems to work fine generally... but! we have a footer in our site that we push down by having the html + body elements have 100% height the body is a flex box and main, inside the body, has flex grow set to 1 to force the footer to the bottom.

Bizarrely, when you load the page on IOS any draggable items that are initially visible work correctly, but items that you need to scroll to see do not work (its the position rather than the items themselves, i.e. moving an item to the end of the list does not make it draggable

Here is the gist

I've just been running it locally with: python -m SimpleHTTPServer

potentially if you have a bigger iphone than me (i have a 7) you might need to make the header larger to force items below the fold

danturn commented 3 years ago

fyi, a fix for this appears to be to use document, rather than document.documentElement for the mousemove bindings...

is there a reason why this would be a bad idea? if not maybe i can raise a PR?