Log In  

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.

Thank you

P#37578 2017-02-18 22:38 ( Edited 2017-02-19 03:38)

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.

P#37637 2017-02-20 09:30 ( Edited 2017-02-20 14:32)

edit your html file, look for "onKeyDown_blocker".
that function blocks space and cursor keys.
add 9 (for tab) in there: [32, 37, 38, 39, 40, 9]

(you should move this thread to "Support", in case zep specifically looks there)

P#37647 2017-02-20 12:46 ( Edited 2017-02-20 17:46)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-03-28 09:31 | 0.009s | 2097k | Q:13