radames commited on
Commit
4e9257d
β€’
1 Parent(s): 5edbfe3

blur skit to next button

Browse files
frontend/src/lib/Result.svelte CHANGED
@@ -57,12 +57,12 @@
57
  const compName = badgesComponents[totalStreaks];
58
  badgeComponent = (await import(`./badges/${compName}.svelte`)).default;
59
  }
60
- // window.addEventListener('keyup', onKeyup, true);
61
  });
62
 
63
- // onDestroy(() => {
64
- // window.removeEventListener('keyup', onKeyup, true);
65
- // });
66
  const s = 10;
67
  const p = 1;
68
  const rx = s / 10;
 
57
  const compName = badgesComponents[totalStreaks];
58
  badgeComponent = (await import(`./badges/${compName}.svelte`)).default;
59
  }
60
+ window.addEventListener('keyup', onKeyup, true);
61
  });
62
 
63
+ onDestroy(() => {
64
+ window.removeEventListener('keyup', onKeyup, true);
65
+ });
66
  const s = 10;
67
  const p = 1;
68
  const rx = s / 10;
frontend/src/routes/index.svelte CHANGED
@@ -221,7 +221,10 @@
221
  <span class="font-light flex-1 text-xs sm:text-base">
222
  <button
223
  tabindex="-1"
224
- on:click={() => restartBoard()}
 
 
 
225
  class="hover:no-underline underline underline-offset-2 hover:scale-105 transition-all duration-200 ease-in-out"
226
  >Skip to next</button
227
  ></span
 
221
  <span class="font-light flex-1 text-xs sm:text-base">
222
  <button
223
  tabindex="-1"
224
+ on:click={(event) => {
225
+ restartBoard();
226
+ event.currentTarget.blur();
227
+ }}
228
  class="hover:no-underline underline underline-offset-2 hover:scale-105 transition-all duration-200 ease-in-out"
229
  >Skip to next</button
230
  ></span