Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging state persists when mouse is dragged outside canvas #22

Open
rantonse opened this issue Oct 29, 2022 · 2 comments
Open

Dragging state persists when mouse is dragged outside canvas #22

rantonse opened this issue Oct 29, 2022 · 2 comments
Labels
has a workaround It's a bug, but there's a workaround

Comments

@rantonse
Copy link

If you click the mouse, drag the cursor outside of the canvas, and then release it, the dragging state persists until you click inside of the canvas again. In the MultiCanvas example, I can get all six to follow the mouse movements by clicking, dragging, and releasing each of them outside their canvases.

Thanks again for your work on this!

@jwdunn1
Copy link
Member

jwdunn1 commented Oct 30, 2022

Thank you for reporting this issue. I will investigate.

@jwdunn1 jwdunn1 added the research This issue is being investigated label Oct 31, 2022
jwdunn1 added a commit that referenced this issue Dec 5, 2022
@jwdunn1
Copy link
Member

jwdunn1 commented Dec 5, 2022

The persistent drag state can be handled with an additional event handler on a sketch basis. See the updated MultiCanvas example.
Additional references on this issue:
stackoverflow.com/a/11533098
stackoverflow.com/a/11533211/4843719
jsfiddle.net/jWkCT
editor.p5js.org/jwdunn1/sketches/QlPK6m_mL

@jwdunn1 jwdunn1 removed the research This issue is being investigated label Dec 5, 2022
@jwdunn1 jwdunn1 added the has a workaround It's a bug, but there's a workaround label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has a workaround It's a bug, but there's a workaround
Projects
None yet
Development

No branches or pull requests

2 participants