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

Mouse can lose button up events if outside bounds of canvas #36

Closed
willeastcott opened this issue Sep 6, 2014 · 3 comments
Closed

Mouse can lose button up events if outside bounds of canvas #36

willeastcott opened this issue Sep 6, 2014 · 3 comments
Assignees
Labels
area: input Input related issue

Comments

@willeastcott
Copy link
Contributor

If you mouse down on the PlayCanvas canvas but then move the mouse outside the bounds of the canvas and mouse up, PlayCanvas still reports the button as pressed (via the isPressed function).

Perhaps we should be capturing the mouse (see Element.setCapture docs) internally in the engine.

@Maksims
Copy link
Contributor

Maksims commented Oct 27, 2014

With change 7dcc7dc we have possibility to catch any scenarios outside of canvas.
We need to decide wether moving mouse outside of canvas will finish mouse event, triggering isPressed right at the edge of canvas element where mouse left canvas. Or should we allow mouse move outside of canvas clamping mouse coords within canvas element? And handling all mouseup events as suppose to, even if they are outside of canvas?

@Maksims
Copy link
Contributor

Maksims commented Feb 24, 2017

Can there be specific example provided to highlight the issue. Otherwise this ticket needs to be closed due to inactivity.

@willeastcott willeastcott added the area: input Input related issue label Apr 15, 2020
@willeastcott
Copy link
Contributor Author

Closing due to inactivity (as suggested by @Maksims back in 2017).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: input Input related issue
Projects
None yet
Development

No branches or pull requests

3 participants