browserquest/BrowserQuest — pull request #122 by sergkr (2013-09-01 03:31:33+00:00)
Title: Fix issue #118 ('a' and 'f' keys do not work in login form)

These were apparently used for debugging purposes ('a' ran the attack animation, and 'f' shows the FPS). The actual functionality was commented out, but the 'return false' part was left in there, which prevented the default action from bubbling up properly.

Explanation for some of the other minor fixes:

- remove app.hideDropDialog(): This is not actually defined. More importantly, it's causing the other ESC key handler in this file from firing (search for the last occurrence of app.hideWindows), which closes any open dialogs (such as achievements or help).

- The event handler for 'a' that called game.player.hit (note: the call was commented out because it was for debugging purposes) was removed entirely since it conflicted with the WASD movement keys (so even if you were to uncomment it, it still wouldn't do anything). Besides, all it did was run the player's attack animation without actually attacking anything, even if you were standing next to someone - probably not terribly useful.

- Handler for the Enter key (key === 13) was present in both the if and else blocks (and was pretty much identical), so it was moved outside.