mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-27 09:58:44 +01:00
give focus in star.js
This commit is contained in:
parent
df5fd1535a
commit
7b77ed6a09
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