From 2ac9a9db293a8c17d182cea0bb0bdd2538b66281 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 24 Aug 2018 14:31:29 +0300 Subject: [PATCH] fix headerOnScroll --- edit/source-editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/source-editor.js b/edit/source-editor.js index c6db55dc..4b91e4f2 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -13,7 +13,7 @@ function createSourceEditor(style) { $('#save-button').disabled = true; $('#mozilla-format-container').remove(); $('#save-button').onclick = save; - $('#header').addEventListener('wheel', headerOnScroll, {passive: true}); + $('#header').addEventListener('wheel', headerOnScroll); $('#sections').textContent = ''; $('#sections').appendChild($create('.single-editor')); @@ -340,7 +340,7 @@ function createSourceEditor(style) { } cm.display.scroller.scrollTop += // WheelEvent.DOM_DELTA_LINE - deltaMode === 1 ? deltaY * cm.display.cachedTextHeight : + deltaMode === 1 ? deltaY * cm.defaultTextHeight() : // WheelEvent.DOM_DELTA_PAGE deltaMode === 2 || shiftKey ? Math.sign(deltaY) * cm.display.scroller.clientHeight : // WheelEvent.DOM_DELTA_PIXEL