From 203fde1fbcf4de93b59659f53d4ad22791bfaf46 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Wed, 20 Nov 2024 22:28:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B9=E5=90=91=E9=94=AE=E6=8C=81?= =?UTF-8?q?=E7=BB=AD=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/styles.css | 1 + src/core/main/custom/hotkey.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/styles.css b/public/styles.css index 31b1596..c625858 100644 --- a/public/styles.css +++ b/public/styles.css @@ -19,6 +19,7 @@ body { #game-draw { position: relative; + overflow: hidden; } #game-draw > * { diff --git a/src/core/main/custom/hotkey.ts b/src/core/main/custom/hotkey.ts index 9c18653..cca863c 100644 --- a/src/core/main/custom/hotkey.ts +++ b/src/core/main/custom/hotkey.ts @@ -228,9 +228,9 @@ export class Hotkey extends EventEmitter { // 检查全局启用情况 if (!this.enabled) return false; const when = this.conditionMap.get(this.scope)!; + if (type === 'up') this.checkPressEnd(key); if (!when()) return false; if (type === 'down') this.checkPress(key); - else this.checkPressEnd(key); const toEmit = this.keyMap.get(key); if (!toEmit) return false;