fix(脑图): 输入状态回车触发添加快捷键事件修复

This commit is contained in:
baiqi 2024-08-16 11:09:44 +08:00 committed by Craftsman
parent bc34fe73f7
commit b783cc4420
1 changed files with 3 additions and 1 deletions

View File

@ -90,7 +90,9 @@ function JumpingRuntime(this: IJumpingRuntime): void {
if (e.type === 'keydown') {
if (e.code === 'Enter') {
e.preventDefault();
return fsm.jump('normal', 'input-commit');
return setTimeout(() => {
fsm.jump('normal', 'input-commit');
}, 0);
}
if (e.code === 'Escape') {
e.preventDefault();