Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSub Msg is lost when a subscription triggers twice rapidly #609
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 19, 2016
Member
Thanks for the example and fix! Should be fixed by elm-lang@cce1dc5 and coming out soon.
|
Thanks for the example and fix! Should be fixed by elm-lang@cce1dc5 and coming out soon. |
evancz
closed this
May 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dancras commentedMay 17, 2016
I have written a module to keep track of the state of the keyboard arrow keys using the
Keyboard.upsandKeyboard.downssubscriptions. The problem is when two"keyup"events occur rapidly, the secondMsgdoes not make it to the update function.The function mapping the subscription data (
keyCode) to aMsgis run for both occurrences, but somewhere between this and the update function the second"keyup"event'sMsgis lost.I've tagged my project at a point where the issue is easy to reproduce with some debug logging. Holding down the left and right arrow key, then quickly releasing both will result in the one of the arrow keys getting stuck in the down state due to the lost
Msg.https://github.com/dancras/eggdude-elm/tree/debug-skipped-messages
https://github.com/dancras/eggdude-elm/blob/debug-skipped-messages/src/ArrowKeys.elm
I'm using OS X Chrome Version 50.0.2661.94 (64-bit)