Keyup not detected using phaser 3 example code

Example of problem using phaser 3 example code.

  1. I run example at
    https://phaser.io/examples/v3/view/input/keyboard/cursor-keys and it works fine. I press right arrow and box moves and stops when I release key.
  2. I install the example set on my ubuntu 16.04 computer at https://github.com/photonstorm/phaser3-examples
  3. I unzip, do npm install and npm start - all is fine
  4. I go to my localhost page and see the example set and I go to the same keyboard/cursor-keys example and run it.
  5. I get the same box and all looks good. I hit right arrow and box moves BUT it does not stop when I release. I can hit left arrow and it does same and box hits left wall. Right arrow now does nothing. Box has green line on it as if it thinks the arrow is still depressed.
  6. If I click my mouse outside of the browser window the green line disappears and I can click back in the window and the right cursor key will take it right but with same stuck results.
  7. The example code allows me to try different phaser 3 versions and I did this and got same results.

I am using ubuntu 16.04 (I also tried 18.04 machine), nodejs v14.7.0 (I also tried v12), npm 6.14.7.

This first was noticed while I was following along on a class which used the “this.cursorKeys.space.isDown” and after key was hit it always returned true no matter when I released the key. I inserted javascript code using onkeydown and it successfully detected when key was released.

I have tried this on multiple versions of ubuntu, multiple machines, and from multiple clients and I get the same results.

Any help you can provide would be greatly appreciated.

Ron

Update: I tried it using firefox and it works fine. The Chrome ver I am using is 84.0.4147.105. I did not expect it to be related to Chrome as that same browser works fine when running the same (presumably) code from the phaser site.

1 Like

Culprit found. The problem went away when I turned off all extensions to chrome. I then turned them back on one by one and the extension that invoked the problem is “Evernote Web Clipper”. Evernote is a popular note taking app (phone app and browser site). Their extension helps with clipping parts of web pages to save to notes. Not critical for me so I removed it. Can not say for sure if it was an Evernote or Phaser problem. Also can not explain why it only fails when the chrome browser goes to my local server for these pages and not when getting them from the Phaser servers. But I am working now so that is all that matters.

Ron

3 Likes

this was my problem for a while as well. thanks for your help to fix this weird problem.