From 28c7d1a613c4d353fcc1621a0a0173b826c53371 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 11 Feb 2022 00:47:50 +0100 Subject: [PATCH] moved click handler fixes 1 circular dependency part of #2462 --- frontend/src/js/elements/commandline.js | 5 +++++ frontend/src/js/elements/keymap.js | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/js/elements/commandline.js b/frontend/src/js/elements/commandline.js index 017b8f8be..9bebd36a8 100644 --- a/frontend/src/js/elements/commandline.js +++ b/frontend/src/js/elements/commandline.js @@ -628,3 +628,8 @@ $(document).on("click", "#commandLineMobileButton", () => { } show(); }); + +$(document).on("click", ".keymap .r5 #KeySpace", (e) => { + CommandlineLists.setCurrent([CommandlineLists.commandsKeymapLayouts]); + show(); +}); diff --git a/frontend/src/js/elements/keymap.js b/frontend/src/js/elements/keymap.js index 847987fc3..b0eb68ea4 100644 --- a/frontend/src/js/elements/keymap.js +++ b/frontend/src/js/elements/keymap.js @@ -1,8 +1,6 @@ import Config, * as UpdateConfig from "../config"; import * as ThemeColors from "./theme-colors"; import layouts from "../test/layouts"; -import * as CommandlineLists from "./commandline-lists"; -import * as Commandline from "./commandline"; import * as SlowTimer from "../states/slow-timer"; export function highlightKey(currentKey) { @@ -264,11 +262,6 @@ export function refreshKeys(layout) { } } -$(document).on("click", ".keymap .r5 #KeySpace", (e) => { - CommandlineLists.setCurrent([CommandlineLists.commandsKeymapLayouts]); - Commandline.show(); -}); - $(document).ready(() => { UpdateConfig.subscribeToEvent((eventKey, eventValue) => { if (eventKey === "layout" && Config.keymapLayout === "overrideSync")