From 7061b561844a75926bbc2a0c76f2d6856fc5b4db Mon Sep 17 00:00:00 2001 From: Miodec Date: Sun, 20 Mar 2022 00:16:07 +0100 Subject: [PATCH] stopping command line when page transition is active --- frontend/src/scripts/elements/commandline.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/scripts/elements/commandline.ts b/frontend/src/scripts/elements/commandline.ts index b7b910a56..7b519f314 100644 --- a/frontend/src/scripts/elements/commandline.ts +++ b/frontend/src/scripts/elements/commandline.ts @@ -6,6 +6,7 @@ import * as TestUI from "../test/test-ui"; import * as DB from "../db"; import * as Notifications from "../elements/notifications"; import * as AnalyticsController from "../controllers/analytics-controller"; +import * as PageTransition from "../states/page-transition"; import { Auth } from "../firebase"; let commandLineMouseMode = false; @@ -375,6 +376,7 @@ $("#commandLine input").keyup((e) => { $(document).ready(() => { $(document).on("keydown", (event) => { + if (PageTransition.get()) return event.preventDefault(); // opens command line if escape, ctrl/cmd + shift + p, or tab is pressed if the setting swapEscAndTab is enabled if ( event.key === "Escape" ||