mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2025-01-14 08:01:19 +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>
|
<script>
|
||||||
state = load_level( levels, 0 );
|
state = load_level( levels, 0 );
|
||||||
start_loop( state, "#main" );
|
start_loop( state, "#main" );
|
||||||
$( document ).focus();
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -210,7 +210,8 @@ function start_loop( state, elt ) {
|
||||||
options.dom_place = elt;
|
options.dom_place = elt;
|
||||||
display_level( state, options.dom_place );
|
display_level( state, options.dom_place );
|
||||||
|
|
||||||
$( document ).keydown( function( e ) {
|
$(document).focus( );
|
||||||
|
$(document).keydown( function( e ) {
|
||||||
switch( e.keyCode ) {
|
switch( e.keyCode ) {
|
||||||
case 38: // UP
|
case 38: // UP
|
||||||
state = make_a_move( state, direction.UP );
|
state = make_a_move( state, direction.UP );
|
||||||
|
|
Loading…
Reference in a new issue