From b3cb4049ed404dbd54c6a4b978a998c0f6823a47 Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Mon, 25 Mar 2024 22:46:02 +0800 Subject: [PATCH] fix: tranbox input onfocus --- src/views/Selection/TranBox.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/views/Selection/TranBox.js b/src/views/Selection/TranBox.js index 69fcffa..09cd607 100644 --- a/src/views/Selection/TranBox.js +++ b/src/views/Selection/TranBox.js @@ -102,17 +102,12 @@ function TranForm({ text, setText, tranboxSetting, transApis }) { fullWidth multiline value={editMode ? editText : text} - disabled={!editMode} onChange={(e) => { setEditText(e.target.value); }} - onClick={() => { + onFocus={() => { setEditMode(true); setEditText(text); - const timer = setTimeout(() => { - clearTimeout(timer); - inputRef.current?.focus(); - }, 100); }} onBlur={() => { setEditMode(false);