diff --git a/star.js/index.html b/star.js/index.html index 66f4e1d..083f78d 100644 --- a/star.js/index.html +++ b/star.js/index.html @@ -49,7 +49,6 @@ diff --git a/star.js/js/star.js b/star.js/js/star.js index 303df68..6cc8482 100644 --- a/star.js/js/star.js +++ b/star.js/js/star.js @@ -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 );