From c43315e697ab5b855eebd867d80d997e26b8a596 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 30 Jul 2020 04:26:38 +0300 Subject: [PATCH] restore Shift-Ctrl-Wheel to scroll window in multi-section mode (#1005) --- edit/sections-editor.js | 3 ++- edit/show-keymap-help.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/sections-editor.js b/edit/sections-editor.js index 6cd09104..bcf95148 100644 --- a/edit/sections-editor.js +++ b/edit/sections-editor.js @@ -34,7 +34,8 @@ function createSectionsEditor({style, onTitleChanged}) { $('#from-mozilla').addEventListener('click', () => showMozillaFormatImport()); $('#save-button').addEventListener('click', saveStyle); - document.addEventListener('wheel', scrollEntirePageOnCtrlShift); + document.addEventListener('wheel', scrollEntirePageOnCtrlShift, {passive: false}); + CodeMirror.defaults.extraKeys['Shift-Ctrl-Wheel'] = 'scrollWindow'; if (!FIREFOX) { $$([ diff --git a/edit/show-keymap-help.js b/edit/show-keymap-help.js index 62481787..66cf08ea 100644 --- a/edit/show-keymap-help.js +++ b/edit/show-keymap-help.js @@ -10,7 +10,6 @@ function showKeyMapHelp() { const keyMap = mergeKeyMaps({}, prefs.get('editor.keyMap'), CodeMirror.defaults.extraKeys); const keyMapSorted = Object.keys(keyMap) .map(key => ({key, cmd: keyMap[key]})) - .concat([{key: 'Shift-Ctrl-Wheel', cmd: 'scrollWindow'}]) .sort((a, b) => (a.cmd < b.cmd || (a.cmd === b.cmd && a.key < b.key) ? -1 : 1)); const table = template.keymapHelp.cloneNode(true); const tBody = table.tBodies[0];