From e094cb20c4c71f6448fe978906f40379f73c0b43 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 21 Apr 2024 10:35:34 +0800 Subject: [PATCH] :memo: https://ld246.com/article/1713618202536 --- app/src/protyle/render/av/action.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 7418fad4d..6fe0f0bc1 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -29,6 +29,7 @@ import {avRender} from "./render"; import {addView, openViewMenu} from "./view"; import {isOnlyMeta, writeText} from "../../util/compatibility"; import {openSearchAV} from "./relation"; +import {Constants} from "../../../constants"; export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLElement }) => { if (isOnlyMeta(event)) { @@ -87,7 +88,9 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle searchElement.style.width = "128px"; searchElement.style.paddingLeft = ""; searchElement.style.paddingRight = ""; - searchElement.focus(); + setTimeout(() => { + searchElement.focus(); + }, Constants.TIMEOUT_TRANSITION); event.preventDefault(); event.stopPropagation(); return true;