Prevent backspace navigation

This commit is contained in:
Lynn 2022-01-16 23:06:29 +01:00
parent d408bff8a3
commit 81555b938d

View file

@ -96,6 +96,9 @@ function Game(props: GameProps) {
if (!e.ctrlKey && !e.metaKey) {
onKey(e.key);
}
if (e.key === "Backspace") {
e.preventDefault();
}
};
document.addEventListener("keydown", onKeyDown);
return () => {