From c7eea4865274105980ab10e34e5ec486ae81d524 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Fri, 31 Jul 2020 11:31:48 +0200 Subject: [PATCH] fix hotkeys not added on reload --- src/002-config/mousetrapConfig.js | 1 + src/js/eventHandlers.js | 1 + src/zz1-last/setupEventHandlers.js | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/002-config/mousetrapConfig.js b/src/002-config/mousetrapConfig.js index ffcfcb7b0d3..c4cb6d42a4f 100644 --- a/src/002-config/mousetrapConfig.js +++ b/src/002-config/mousetrapConfig.js @@ -238,6 +238,7 @@ App.UI.Hotkeys = (function() { // discard obsolete hotkeys if (actions[saveKey]) { actions[saveKey].combinations = save[saveKey]; + addBinding(saveKey, save[saveKey]); } } } diff --git a/src/js/eventHandlers.js b/src/js/eventHandlers.js index f14431042ab..9942b621297 100644 --- a/src/js/eventHandlers.js +++ b/src/js/eventHandlers.js @@ -22,6 +22,7 @@ App.EventHandlers = function() { } function storyReady() { + App.UI.Hotkeys.init(); } function optionsChanged() { diff --git a/src/zz1-last/setupEventHandlers.js b/src/zz1-last/setupEventHandlers.js index 593787eae84..0a6ef416022 100644 --- a/src/zz1-last/setupEventHandlers.js +++ b/src/zz1-last/setupEventHandlers.js @@ -4,7 +4,6 @@ Config.saves.onSave = App.EventHandlers.onSave; $(document).on(':storyready', function() { App.EventHandlers.storyReady(); - App.UI.Hotkeys.init(); }); $(document).one(':passagestart', function() { -- GitLab