mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-03 05:54:22 +08:00
fix: unable to enter fullscreen on result page
This commit is contained in:
parent
0d9a1d9da5
commit
3375419023
1 changed files with 2 additions and 2 deletions
|
|
@ -11,14 +11,14 @@ import * as TestLogic from "../test/test-logic";
|
|||
import { navigate } from "../controllers/route-controller";
|
||||
import { isInputElementFocused } from "../input/input-element";
|
||||
import * as ManualRestart from "../test/manual-restart-tracker";
|
||||
import * as TestState from "../test/test-state";
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (PageTransition.get()) return;
|
||||
if (e.key === undefined) return;
|
||||
|
||||
const pageTestActive: boolean = ActivePage.get() === "test";
|
||||
|
||||
if (pageTestActive && !isInputElementFocused()) {
|
||||
if (pageTestActive && !TestState.resultVisible && !isInputElementFocused()) {
|
||||
const popupVisible: boolean = Misc.isAnyPopupVisible();
|
||||
// this is nested because isAnyPopupVisible is a bit expensive
|
||||
// and we don't want to call it during the test
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue