phetsims/quadrilateral

Problem with global shift key listener

jessegreenberg opened this issue · 6 comments

  • Make sure sim is in the foreground
  • Press shift
  • Click outside of the browser window
  • release shift

The global KeyboardListener does not get inerrupted and so from then on the shift key is "stuck" down.

Also happens if you shift tab out of the sim. That makes sense, it is effectively the same state.

Couldn't find a good way to interrupt the listener or detect when the tab has lost focus in ~20 minutes of trying. Will have to come back later.

A workaround is applied above. We need support for that in scenery/joist so that listeners will interrupt but this is sufficient for our immediate goals.

Could we make a scenery issue for this? Would it be helpful to try to spend a bit of time pairing on a general solution?

For sure, thanks. I was just in crunch time when I was here last. I started phetsims/scenery#1516.

This is now built in to KeyboardListener, TODO removed. Closing.