bug-fix: Ctrl+D/U to scroll down/up half page instead of one page

This commit is contained in:
Le Tan 2017-06-23 19:45:27 +08:00
parent 34afc2731d
commit 927c0f5c27

View File

@ -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;