-
Notifications
You must be signed in to change notification settings - Fork 160
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
[BUG] keyup event is not working in 2.0.0-pre5 #166
Comments
Same here. 😕 |
Hey @shtrih, thank you for the great write-up. Eye-balling the logs, it seems the keyup event is indeed being triggered/registered correctly - but it's not finding the correct matcher. I'll take a look further into this. |
@shtrih , after looking into this a tiny bit more, I wanted to clarify what your expectations are. Are you expecting the same handler to be called when the ctrl key is pressed down (keydown) and when it is released (keyup)? This is somewhat unusual, but should in theory work as described. If you could humour me and help diagnose the issue - if you split the handling of the keydown and the keyup events into two handlers, are both called correctly (on keydown and keyup, respectively)? The other thing that comes to mind is that your keydown event is setting state on the component. This may be the reason why the component is not properly registering the keyup handler, as it is somewhere in the process of updating the same component that is still expected to be listening for the keyup event. This is unfortunately very hand-wavey at this point, as it will take some time to get my headspace back into the particulars of how the code handles this, but it may be the source of your issue. I have tested I look forward to hearing what results you get. |
Yes.
https://jsfiddle.net/shtrih/w6oqux43/112/ — |
Ok, so what I am getting from your responses is that:
Playing around with your JS fiddle a little more, the bug also seems to occur for other keys where the keypress event is simulated (such as Turning off simulating key press events seems to fix it (I believe @marcosabb previously suggested this, but I can no longer see the comment for some reason):
This gives me a great starting point for diagnosing what is causing this issue. Thanks for your help in troubleshooting. I'll look into this further and (hopefully) have a fix in the next pre-release. |
@greena13 Yes, the option |
Fix should be available in v2.0.0-pre7. |
Describe the bug
keyup
key event is not trigger a callback.Code
Expected behavior
Expected call of
keyup
event handler.Here live for
2.0.0-pre5
: https://jsfiddle.net/shtrih/w6oqux43/Here for
1.1.4
(work as expected): https://jsfiddle.net/shtrih/w6oqux43/100/Platform (please complete the following information):
2.0.0-pre5
Chrome 73.0.3683.103 (Official, 64 bit)
Windows 10
APPLICABLE TO v2.0.0-pre1 AND ABOVE: ======================
Include the smallest log that includes your issue:
What Configuration options are you using?
The text was updated successfully, but these errors were encountered: