I export my game with "export blah.html" and play the html file in firefox or chromium-browser. When I hold down tab, which is the default player 2 button O, it seems to cause the browser focus to jump up into the address bar, search bar, and around any other anchors of the page etc. By this, it interrupts holding down button O in the game.
However, games on the BBS do not seem to exhibit this issue. For example, my same game that I uploaded to the BBS does not have that behavior on its BBS post page (I hold down tab, the focus stays in the game) but it does if i export it myself to html/js and play that file (I hold down tab, now the address bar is highlighted, now the search bar, now the game, repeats flipping around). So there may be something in the BBS HTML that keeps the browser from handling the tab key that way.
I see this on Firefox and chromium-browser both. It is cumbersome for my beta testing my game in which either player would typically hold down button "O" to build up strength. I may have to rethink my buttons. Any thoughts? I will look into maybe a little edit I can make to my own HTML exports. Thanks..
2/20 huge props to ultrabrite for this easy solution
- Open the HTML
- Search for onKeyDown_blocker
- Add 9 to the list (change [32, 37, 38, 39, 40] to [32, 37, 38, 39, 40, 9])
Moved to the support category.
This is just something browsers do. It is to help with navigating forms (such as when entering username/password). I'm not sure how to stop this behaviour, but i found a stackoverflow post that might point you in the right direction.
You can also try searching for js stop tab default action.
[Please log in to post a comment]