We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.focus()
1 parent d1a5cb1 commit 43461aaCopy full SHA for 43461aa
1 file changed
src/pages/options/routes/script/ScriptEditor.tsx
@@ -897,12 +897,6 @@ function ScriptEditor() {
897
}}
898
onClick={() => {
899
setShowSearchInput(!showSearchInput);
900
- setTimeout(
901
- () =>
902
- showSearchInput &&
903
- (document.querySelector("#editor_search_scripts_input") as HTMLInputElement)?.focus(),
904
- 1
905
- );
906
907
>
908
<div className="tw-flex tw-justify-between tw-items-center">
@@ -919,7 +913,8 @@ function ScriptEditor() {
919
913
<Input
920
914
placeholder={t("search_scripts")}
921
915
allowClear
922
- value={searchKeyword}
916
+ autoFocus
917
+ defaultValue={searchKeyword}
923
918
onChange={(value) => setSearchKeyword(value)}
924
size="mini"
925
id="editor_search_scripts_input"
0 commit comments