mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-07-14 05:12:11 +08:00
fix the abnormal BUG that occurs when using Alt + F4 shortcut keys.
This commit is contained in:
parent
64007a12e9
commit
ace6f282d0
@ -271,7 +271,10 @@ function keydown(e: any) {
|
||||
e.preventDefault();
|
||||
}
|
||||
// 禁止关闭页面
|
||||
if (shortcutKey.toLowerCase() === "ctrl + w") {
|
||||
if (
|
||||
shortcutKey.toLowerCase() === "ctrl + w" ||
|
||||
shortcutKey.toLowerCase() === "alt + f4"
|
||||
) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +105,7 @@ function checkKeyCode(e: any) {
|
||||
// e.keyCode == 16 Shift
|
||||
// e.keyCode == 17 Control
|
||||
// e.keyCode == 18 Alt
|
||||
// e.keyCode == 91 Mate(Win)
|
||||
// e.keyCode == 20 Cape Lock 大小写
|
||||
// e.keyCode == 27 Esc
|
||||
// (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区
|
||||
@ -125,6 +126,7 @@ function checkKeyCode(e: any) {
|
||||
e.keyCode === 16 ||
|
||||
e.keyCode === 17 ||
|
||||
e.keyCode === 18 ||
|
||||
e.keyCode === 91 ||
|
||||
e.keyCode === 20 ||
|
||||
e.keyCode === 27 ||
|
||||
(e.keyCode >= 32 && e.keyCode <= 40) ||
|
||||
|
Loading…
Reference in New Issue
Block a user