diff --git a/frontend/src/js/config.js b/frontend/src/js/config.js index 22d836cda..3b359d45f 100644 --- a/frontend/src/js/config.js +++ b/frontend/src/js/config.js @@ -3,7 +3,6 @@ import * as Sound from "./controllers/sound-controller"; import * as OutOfFocus from "./test/out-of-focus"; import * as Notifications from "./elements/notifications"; import * as LanguagePicker from "./settings/language-picker"; -import * as UI from "./ui"; import * as CommandlineLists from "./elements/commandline-lists"; import * as BackgroundFilter from "./elements/custom-background-filter"; import LayoutList from "./test/layouts"; @@ -361,7 +360,6 @@ export function setSwapEscAndTab(val, nosave) { val = false; } config.swapEscAndTab = val; - UI.updateKeytips(); if (!nosave) saveToLocalStorage(); dispatchEvent("swapEscAndTab", config.swapEscAndTab); } diff --git a/frontend/src/js/ui.js b/frontend/src/js/ui.js index ecca0f868..be6c71cc9 100644 --- a/frontend/src/js/ui.js +++ b/frontend/src/js/ui.js @@ -270,3 +270,9 @@ $(document).on("click", "#top #menu .icon-button", (e) => { } return false; }); + +$(document).ready(() => { + UpdateConfig.subscribeToEvent((eventKey) => { + if (eventKey === "swapEscAndTab") updateKeytips(); + }); +});