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

mouse drawing drag end doesn't always get detected correctly #45

Closed
nurpax opened this Issue Jul 27, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@nurpax
Owner

nurpax commented Jul 27, 2018

Sometimes "draw draw" (e.g., draw with mouse button pressed down) doesn't release the mouse down state and keeps drawing even if I'm not pressing the mouse button.

I think this repros by moving the cursor out of the framebuffer area and doing "something" (maybe click a button on the left menu).

@nurpax nurpax added this to the 0.1 milestone Jul 27, 2018

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Jul 30, 2018

Yes, this happened to me too.
Unfortunately I can't provide repro neither. :(
...but maybe connected to the brush drawing somehow?... I felt that this happened after interacting with the brush tool menu?... Not sure though.

Viza74 commented Jul 30, 2018

Yes, this happened to me too.
Unfortunately I can't provide repro neither. :(
...but maybe connected to the brush drawing somehow?... I felt that this happened after interacting with the brush tool menu?... Not sure though.

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Jul 30, 2018

Owner

i think it happens when you drag (draw, colorize, brush) and click something else (eg. toolbar)

Owner

nurpax commented Jul 30, 2018

i think it happens when you drag (draw, colorize, brush) and click something else (eg. toolbar)

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Jul 30, 2018

Ok, I got repro on this:
Happens when the mouse release event is happening outside of the canvas.
So just start drawing on the canvas, mose the mouse outside, the release the button.
The program will act as if the mouse is held down anytime you move the cursor back over the canvas.
You don't have to click any button or whatever outside the canvas. In fact you can do anything (change color, or tool) and it will stay in mouse down mode over the canvas.

So the program probably just waiting for mouse up on the canvas, which never arries.

Viza74 commented Jul 30, 2018

Ok, I got repro on this:
Happens when the mouse release event is happening outside of the canvas.
So just start drawing on the canvas, mose the mouse outside, the release the button.
The program will act as if the mouse is held down anytime you move the cursor back over the canvas.
You don't have to click any button or whatever outside the canvas. In fact you can do anything (change color, or tool) and it will stay in mouse down mode over the canvas.

So the program probably just waiting for mouse up on the canvas, which never arries.

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Jul 30, 2018

Owner

probably need to use mouse capture w/ pointer events to fix this. would like this for large brush drawing too

https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture

See also #1

Owner

nurpax commented Jul 30, 2018

probably need to use mouse capture w/ pointer events to fix this. would like this for large brush drawing too

https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture

See also #1

@nurpax nurpax closed this in 25af070 Jul 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment