mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 06:19:52 +08:00
bug-fix: Ctrl+D/U to scroll down/up half page instead of one page
This commit is contained in:
parent
34afc2731d
commit
927c0f5c27
@ -155,7 +155,7 @@ document.onkeydown = function(e) {
|
|||||||
keyState = 0;
|
keyState = 0;
|
||||||
if (ctrl) {
|
if (ctrl) {
|
||||||
var clientHeight = document.documentElement.clientHeight;
|
var clientHeight = document.documentElement.clientHeight;
|
||||||
window.scrollBy(0, -clientHeight);
|
window.scrollBy(0, -clientHeight / 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -164,7 +164,7 @@ document.onkeydown = function(e) {
|
|||||||
keyState = 0;
|
keyState = 0;
|
||||||
if (ctrl) {
|
if (ctrl) {
|
||||||
var clientHeight = document.documentElement.clientHeight;
|
var clientHeight = document.documentElement.clientHeight;
|
||||||
window.scrollBy(0, clientHeight);
|
window.scrollBy(0, clientHeight / 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user