2 ms·
No, they're just all making the same crazy omission: event.preventDefault(); I have a fix, if you're interested, in my top-level comment: http://news.ycombinat
by Groxx 15y ago
No, they're just all making the same crazy omission: event.preventDefault();
I have a fix, if you're interested, in my top-level comment: http://news.ycombinator.com/item?id=2798835 http://news.ycombinator.com/item?id=2798835
- middus 15y agoThis will deactivate all keys, including e.g. F5 for refresh. Moreover, mentioning this here won't necesserily get it fixed. Here's a pull request: https://github.com/robertkleffner/mariohtml5/pull/3 https://github.com/robertkleffner/mariohtml5/pull/3 Feel free to comment / add.
- Groxx 15y agoWhich is why you restrict it by A) the list of known keys (the values are already in an array in the same file), and if you're feeling nice B) after clicking inside the container the game lives in. All of which is mind-numbingly easy, but far below 50% of "HTML5" games I've played have done so.