Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1151
This fix is a bit different than the
blur
stuck keys fix. The problem is that if you're holding a key down, thekeydown
event sometimes fires a few times after thecontextmenu
event, thus setting them again after clear.After quite a bit of testing, I believe the issue is that the
contextmenu
event enqueues beforekeydown
events stop enquing. By callingclear
asynchronously (using setTimeout to put it at the end of the queue) this seems to be fixed. I tested theblur
fix for this bug, which doesn't seem to exist (in Chrome at least).Given these are events, I don't think addressing it asynchronously is a problem: the behaviour is already async in nature.
Thank you for offering up your time to review my bug report and this proposed fix.