For what it's worth, I am actually of the opposite opinion, Ash.<br><br>I like it when Flash steals the focus of the keyboard, and here's why: Besides the arrow keys, which are available to everyone, I also use the "Find As You Type" feature in Firefox. However, that usually means that I can't play any HTML5 games that use letters as play keys. Because the HTML5 game usually doesn't steal the focus of the keyboard, typing a letter key activates the FAYT feature and distracts me from the game.<br>
<br>With that being said, Bespin (from Mozilla Labs) uses <canvas>, and it has no problem stealing the keyboard focus (with JavaScript) for most keypresses.<br><br>Gordon<br><br><div class="gmail_quote">2010/6/14 Ashley Sheridan <span dir="ltr"><<a href="mailto:ash@ashleysheridan.co.uk">ash@ashleysheridan.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="im">
On Mon, 2010-06-14 at 13:38 -0600, Carlos Andrés Solís wrote:<br>
<blockquote type="CITE">
Hello! I've been noticing a problem in many HTML5 test apps, very especially games. When the directional arrow buttons are pressed, the screen scrolls. This is a problem that, as far as I know, Flash had solved by changing the focus of the application to the app. Is this doable in HTML5?<br>
- Carlos Solís<br>
</blockquote>
<br></div>
I don't think it's something that was 'solved' by Flash. To be honest, I'm often annoyed at the way Flash steals the focus of all my key presses making it almost impossible to navigate using only the keyboard.<br>
<br>
You could use Javascript to put the focus onto an object, capture all the key presses on that and return false for them all maybe.<br>
<br>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td>
Thanks,<br>
Ash<br>
<a href="http://www.ashleysheridan.co.uk" target="_blank">http://www.ashleysheridan.co.uk</a><br>
<br>
<br>
</td>
</tr>
</tbody></table>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Gordon P. Hemsley<br><a href="mailto:me@gphemsley.org">me@gphemsley.org</a><br><a href="http://gphemsley.org/">http://gphemsley.org/</a> • <a href="http://gphemsley.org/blog/">http://gphemsley.org/blog/</a><br>
<a href="http://sasha.sourceforge.net/">http://sasha.sourceforge.net/</a> • <a href="http://www.yoursasha.com/">http://www.yoursasha.com/</a><br>