I've got a very strange behavior of the keyUp event. JS snippet is attached. Tested on Chrome/Chromium.
Steps to reproduce:
- F11 to go fullscreen
- Press down A key (leave it pressed)
- Press F11 to exit fullscreen
- Release the A key
Result - NO output lines in the console! Why is that? I expected to see something, but it seems that exiting a fullscreen disables the future keyUp events. In my case I start a job by pressing a key, and need to stop it after the release. Currently it continues to run.
The question is - how do I get it working?
Could that be a Chrome/Chromium bug? I've tried Firefox now - keyup event is successfully triggered.
i = 0;
window.addEventListener("keyup", function() {
console.log("key up, " + i);
i = i+1;
});