-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
key may be incorrect inside an event handler #7569
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Do you see the same repetition behaviour in this sketch? I tried it on Firefox on Mac and couldn't reproduce it, I wonder if the OS has something to do with it: https://editor.p5js.org/davepagurek/sketches/H8yqpnBWw Also in that sketch, in index.html, I have a commented-out script tag for the 2.0 beta. If you swap out the script tags, does the repetition issue happen for you there? For the |
I have tried it and the repetition happens for me in both 1.11.3 and 2.0 beta. |
I'll try to replicate this on Linux, will report back. |
I'm able to replicate the problem on Firefox on Linux ( |
The incorrect @davepagurek Is that removal intentional? It is a bit up for interpretation from the reference of |
I think putting it back doesn't change the behaviour of the rest of that PR. I think it may have been due to a misunderstanding of what |
Most appropriate sub-area of p5.js?
p5.js version
1.11.3
Web browser and version
Firefox 135.0 / Chromium 133
Operating system
Linux 6.13.2
Steps to reproduce this
Steps:
d
a
d
. InkeyReleased
key
will be equal toa
, thoughev.key
will be correct (d
).This happens since
1.11.3
. In1.11.2
and before everything works correctly.There's also an issue with
keyPressed
in Firefox (not in Chromium). It fires continuously while a key is pressed, not just once. It is probably linked to this issue, since it started happening in1.11.3
, I don't know if I should create a new issue about that too.Snippet:
The text was updated successfully, but these errors were encountered: