anseki / plain-draggable

The simple and high performance library to allow HTML/SVG element to be dragged.
https://anseki.github.io/plain-draggable/
MIT License
773 stars 99 forks source link

Scrolling browser causes draggables to change position randomly #117

Closed Zander1983 closed 2 years ago

Zander1983 commented 2 years ago

I love your library. However I've seen a strange issue. I have a series of graphs - these are HTML canvases wrapped in divs. There is a hierarchy, a graph has a parent and can have multiple children. It looks like this:

2022-09-12_19-25-21

However, when I scroll down, sometimes they jump about:

2022-09-12_19-28-50

When I look in the inspector, I can see that as I scroll, the transform in the css changes as I scroll:

2022-09-12_19-30-44

Im not including code here, but I will if needed. Any ideas what this could be? Thanks

anseki commented 2 years ago

Hi @Zander1983, thank you for the comment. Could you show an example by using e.g. https://jsfiddle.net/ to reproduce that?

Zander1983 commented 2 years ago

@anseki thats going to take some time! Or would you be willing to look at the code? I can pay you a consultancy fee...

anseki commented 2 years ago

You don't have to make your app in JSFiddle. It's just only an example code to reproduce that issue, I will read the your code, then I might find a bug in your code.

Zander1983 commented 2 years ago

Yes ill try that. My project is really complex though. Many moving parts. I'll see can I reproduce on Jsfiddle and post back here then.

anseki commented 2 years ago

Ok :smile:

anseki commented 2 years ago

No reply came, then this abandoned issue is closed.

Zander1983 commented 2 years ago

Its hard to reproduce, but happens from time to time. When I reproduce, ill create a ticket and a fiddle.

anseki commented 2 years ago

Ok :smile: Maybe your app or another library does something in scroll event.