From 927c0f5c27707dc2964ec5496f92811e733be6a1 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 23 Jun 2017 19:45:27 +0800 Subject: [PATCH] bug-fix: Ctrl+D/U to scroll down/up half page instead of one page --- src/resources/markdown_template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/markdown_template.js b/src/resources/markdown_template.js index 795db62b..3e69f58d 100644 --- a/src/resources/markdown_template.js +++ b/src/resources/markdown_template.js @@ -155,7 +155,7 @@ document.onkeydown = function(e) { keyState = 0; if (ctrl) { var clientHeight = document.documentElement.clientHeight; - window.scrollBy(0, -clientHeight); + window.scrollBy(0, -clientHeight / 2); break; } return; @@ -164,7 +164,7 @@ document.onkeydown = function(e) { keyState = 0; if (ctrl) { var clientHeight = document.documentElement.clientHeight; - window.scrollBy(0, clientHeight); + window.scrollBy(0, clientHeight / 2); break; } return;