Prevent backspace navigation
This commit is contained in:
parent
d408bff8a3
commit
81555b938d
|
@ -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 () => {
|
||||
|
|
Loading…
Reference in a new issue