update patch notes.

This commit is contained in:
Olivier Gagnon
2021-08-15 15:23:39 -04:00
parent 67e5e413e4
commit 539b206cb5
2 changed files with 22 additions and 10 deletions
+6 -1
View File
@@ -8,6 +8,11 @@ export function KeyHandler(props: IProps): React.ReactElement {
let elem: any;
useEffect(() => elem.focus());
function onKeyDown(event: React.KeyboardEvent<HTMLElement>): void {
if(!event.isTrusted) return;
props.onKeyDown(event);
}
// invisible autofocused element that eats all the keypress for the minigames.
return (<div tabIndex={1} ref={c => elem = c} onKeyDown={props.onKeyDown} />)
return (<div tabIndex={1} ref={c => elem = c} onKeyDown={onKeyDown} />)
}