From 0f394fa8d83de2d6b3233a75f8158db268ff658f Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 1 Aug 2020 17:57:02 +0300 Subject: [PATCH] don't scroll CM when target is a scrollable input --- edit/source-editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edit/source-editor.js b/edit/source-editor.js index 7119cfa5..c4d1c041 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -350,6 +350,9 @@ function createSourceEditor({style, onTitleChanged}) { } function headerOnScroll({target, deltaY, deltaMode, shiftKey}) { + if (target.tagName === 'INPUT' && target.type === 'number') { + return; + } while ((target = target.parentElement)) { if (deltaY < 0 && target.scrollTop || deltaY > 0 && target.scrollTop + target.clientHeight < target.scrollHeight) {