Skip to content

Commit a163f3a

Browse files
committed
replの初期化が完了したらfocus
1 parent 89fc552 commit a163f3a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/terminal/repl.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ export function ReplTerminal({
425425
// なぜかそのままscrollToTop()を呼ぶとスクロールせず、setTimeoutを入れるとscrollする(治安bad)
426426
setTimeout(() => terminalInstanceRef.current!.scrollToTop());
427427
setInitCommandState("done");
428+
terminalInstanceRef.current?.focus();
428429
})();
429430
}
430431
}, [
@@ -458,11 +459,7 @@ export function ReplTerminal({
458459
return (
459460
<Modal
460461
id={"repl-" + terminalId}
461-
className={clsx(
462-
"bg-base-300",
463-
"flex flex-col",
464-
"isolate"
465-
)}
462+
className={clsx("bg-base-300", "flex flex-col", "isolate")}
466463
open={isModal}
467464
setOpen={setIsModal}
468465
>

0 commit comments

Comments
 (0)