From ff7bf41d8cf78d3d28a883cedec077ca1c72771f Mon Sep 17 00:00:00 2001 From: troyeguo <13820674+troyeguo@users.noreply.github.com> Date: Tue, 28 Apr 2026 20:07:19 +0800 Subject: [PATCH] refactor: remove unnecessary timeout for setting textarea value in assistant mode --- src/components/popups/popupOption/component.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/popups/popupOption/component.tsx b/src/components/popups/popupOption/component.tsx index 8eb6a10b..55b1f85b 100644 --- a/src/components/popups/popupOption/component.tsx +++ b/src/components/popups/popupOption/component.tsx @@ -183,16 +183,6 @@ class PopupOption extends React.Component { this.props.handleMenuMode("assistant"); this.props.handleOpenMenu(true); - setTimeout(() => { - let textAreaElement = document.querySelector( - "#trans-add-content-box" - ) as HTMLTextAreaElement; - console.log(textAreaElement, "textAreaElement"); - if (textAreaElement) { - textAreaElement.value = text; - textAreaElement.dispatchEvent(new Event("input", { bubbles: true })); - } - }, 1000); }; handleOpenPopupOptionDialog = () => {