Skip to content

Commit

Permalink
fix: avoid server round trips when playing Sverdle with a keyboard (#416
Browse files Browse the repository at this point in the history
)
  • Loading branch information
eltigerchino authored Jan 23, 2025
1 parent 43f73a2 commit 9996b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/three-humans-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/create': patch
---

fix: ensure Sverdle keyboard events modify game state without a trip to the server if client-side JavaScript is enabled
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
document
.querySelector(`[data-key="${event.key}" i]`)
?.dispatchEvent(new MouseEvent('click', { cancelable: true }));
?.dispatchEvent(new MouseEvent('click', { cancelable: true, bubbles: true }));
}
</script>

Expand Down

0 comments on commit 9996b07

Please sign in to comment.