修复滚动条BUG

This commit is contained in:
fofolee 2019-12-24 10:00:53 +08:00
parent fcbb15455b
commit 02b6fa9cce
5 changed files with 32 additions and 24 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
assets/.DS_Store vendored

Binary file not shown.

View File

@ -97,8 +97,12 @@ highlightManual = (selector, text) => {
// 初始化
scrollInit = () => {
$("html").niceScroll();
$("#manual").niceScroll();
$("html").niceScroll({
enablekeyboard: false
});
$("#manual").niceScroll({
enablekeyboard: true
});
}
// 向活动窗口发送文本
@ -327,6 +331,7 @@ $(document).keydown(e => {
break;
// 上
case 38:
if ($('#manual').is(':hidden') && $("#mainlist").is(":visible")) {
let pre = $(".select").prev();
// 没有到达边界时移动选择条
if (pre.length != 0) {
@ -339,9 +344,11 @@ $(document).keydown(e => {
} else {
$(".select").animate({ "opacity": "0.3" }).delay(500).animate({ "opacity": "1" })
}
}
break;
// 下
case 40:
if ($('#manual').is(':hidden') && $("#mainlist").is(":visible")) {
let next = $(".select").next();
// 没有到达边界时移动选择条
if (next.length != 0) {
@ -355,6 +362,7 @@ $(document).keydown(e => {
} else {
$(".select").animate({ "opacity": "0.3" }).delay(500).animate({ "opacity": "1" })
}
}
break;
}
});

BIN
docs/.DS_Store vendored

Binary file not shown.

View File

@ -28,7 +28,7 @@ dirname = __dirname;
isWin = process.platform == 'win32' ? true : false;
openFolder = () => {
return dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
return dialog.showOpenDialogSync(BrowserWindow.getFocusedWindow(), {
buttonLabel: '选择',
properties: ['openDirectory']
});