From ed71c196193e76793ecddce7e4e7bc62edb3a609 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 12 Jul 2011 16:46:04 +0200 Subject: [PATCH] give focus in star.js --- index.html | 1 - js/star.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 66f4e1d..083f78d 100644 --- a/index.html +++ b/index.html @@ -49,7 +49,6 @@ diff --git a/js/star.js b/js/star.js index 303df68..6cc8482 100644 --- a/js/star.js +++ b/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 );