increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 159 forks source link

Browser tab close keyboard shortcut is ignored and creates stuck key #51

Closed roryokane closed 3 years ago

roryokane commented 10 years ago

The W key gets stuck when I hit Command-W to close the tab in Firefox on Mac OS X. Not only does the tab not close, but also W (up) is continuously sent to the game until I press and release W again. Try it out when playing a game – the character in that game will continuously jump when you hit Command-W.

This bug does not happen in Chrome for Mac. I have not tried other browsers or other keyboard shortcuts.

Related to #38.

increpare commented 10 years ago

What version of OSX/Firefox do you have? I can't reproduce it on OSX 10.9.1/firefox 27.0.1

On Tue, Feb 18, 2014 at 9:56 PM, Rory O'Kane notifications@github.comwrote:

The W key gets stuck when I hit Command-W to close the tab in Firefox on Mac OS X. Not only does the tab not close, but also W (up) is continuously sent to the game until I press and release W again. Try it out when playing a game http://www.puzzlescript.net/play.html?p=6851495.

This bug does not happen in Chrome for Mac.

Related to #38 https://github.com/increpare/PuzzleScript/issues/38.

Reply to this email directly or view it on GitHubhttps://github.com/increpare/PuzzleScript/issues/51 .

roryokane commented 10 years ago

I have OS X 10.6.8 Snow Leopard and Firefox 27.0.1. The problem also occurs in Safari 5.1.10.

The following three shortcuts also ignore the behavior and make the key stick, in Firefox, Safari, and even Chrome: ⌘A (Select All), ⌘S (Save), ⌘D (Bookmark).

If I hit any one of the four shortcuts repeatedly and quickly in any browser, soon one of those times works, and the intended behavior activates. Perhaps the shortcuts work some of the time, randomly.

increpare commented 3 years ago

probably fixed, given that related issues are fixed

roryokane commented 3 years ago

Testing this again, the issue with ⌘W described in the title was fixed—⌘W always works—but the related issues with ⌘A, ⌘S, and ⌘D I described in this comment are still a problem.

In both Firefox 85 and Chrome 88 on macOS 10.14, I see that sometimes those three keyboard shortcuts ⌘A, ⌘S, and ⌘D fail to trigger their browser function and instead cause the game to repeat that motion as if the key were held down.

increpare commented 3 years ago

Thanks for getting back so quickly. OK if you reload puzzlescript.net now it should be good (you may have to hit the reload button - in the puzzlescript console it will say V1.7)

roryokane commented 3 years ago

Yep, it seems to be fixed now in both Firefox and Chrome.