Prevent backspace from closing simulation



  • I've had to restart my simulation a few times due to inadvertent pressing of backspace with focus somewhere else than an input box. Hitting backspaceĀ takes you back to the main menu, hence resetting the simulation.

    I'm sure it's the built-in browser back feature kicking in, but I'm also pretty sure there's some event to prevent it with. Especially within a "proprietary client".

    I know saving sims are on the board, but this would be a very appreciated quick fix. šŸ™‚

    Great game! KUTGW!



  • Agreed.Ā 

    A simple "Do you really want to leave the simulation" confirm would be sufficient. (e.g. using onbeforeunload or onkeydown)



  • Please god yes.
    Nothing more annoying than testing something on a creep that takes a while to set up. Meanwhile your typing up a bit of code, hit backspace and oop you gotta restart.