kesiev / akihabara

A game engine for making classic arcade style games using Javascript and HTML5. We're starting moving on a re-organized repo here: https://github.com/akihabara
http://www.kesiev.com/akihabara
GNU General Public License v2.0
531 stars 57 forks source link

Problems with frames #4

Closed alrik11es closed 14 years ago

alrik11es commented 14 years ago

If I embed one of the applications the focus isnt on it. You have to click in the border of the webpage to get the focus and then use the game. I dont know if its a problem or is it suposed to work that way, or if it's a problem of my browser (chrome).

kesiev commented 14 years ago

Focus handling in a web page is quite difficult to "pick", so that clickable area was made for making sure that the focus is on the game. I've tried some solutions but what really works on most of the devices (iPad using hardware keyboards, over all) is that one. Probably something in the middle is doable: you can try to set the focus on the hidden textarea on click of the screen area. Should be simple to try. Then... tell how works or commit on your branch! :)

alrik11es commented 14 years ago

Ok lets give it a try thanks.

alrik11es commented 14 years ago

Ok i've found the problem, the solution to my problem was here: <-/ FRAMESET rows="60, 100%" border="0" onload="document.getElementById('mainFrame').focus();"> Just adding the document...blabla in the onload event on the frameset. I gess that if you are using the <-/body> tag have also solution with the same or similar thing.

kesiev commented 14 years ago

Embeddability was totally ignored during development, since was meant for the one-page-one-game way - makes mobile versions easier to play. But surely is something that needs some love too. I'll add this to the todo.