give focus in star.js
This commit is contained in:
parent
07b26c8e57
commit
ed71c19619
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,6 @@
|
|||
<script>
|
||||
state = load_level( levels, 0 );
|
||||
start_loop( state, "#main" );
|
||||
$( document ).focus();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -210,7 +210,8 @@ function start_loop( state, elt ) {
|
|||
options.dom_place = elt;
|
||||
display_level( state, options.dom_place );
|
||||
|
||||
$( document ).keydown( function( e ) {
|
||||
$(document).focus( );
|
||||
$(document).keydown( function( e ) {
|
||||
switch( e.keyCode ) {
|
||||
case 38: // UP
|
||||
state = make_a_move( state, direction.UP );
|
||||
|
|
Loading…
Reference in a new issue