radames commited on
Commit
803a89f
β€’
1 Parent(s): 95f19db

testing focus to enable keyboard

Browse files
Files changed (1) hide show
  1. frontend/src/routes/index.svelte +3 -0
frontend/src/routes/index.svelte CHANGED
@@ -24,7 +24,10 @@
24
  restartBoard();
25
  window.addEventListener('keyup', onKeyup, true);
26
  window.addEventListener('resize', onResize);
 
 
27
  });
 
28
  function onResize() {
29
  document.body.style.setProperty('--vh', window.innerHeight + 'px');
30
  }
 
24
  restartBoard();
25
  window.addEventListener('keyup', onKeyup, true);
26
  window.addEventListener('resize', onResize);
27
+ window.focus();
28
+ document.body.addEventListener('click', () => window.focus(), false);
29
  });
30
+
31
  function onResize() {
32
  document.body.style.setProperty('--vh', window.innerHeight + 'px');
33
  }