mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 16:02:19 +00:00
fix(app): Edit-project name race condition (#9551)
This commit is contained in:
parent
de87694867
commit
1f3b2b5951
1 changed files with 1 additions and 1 deletions
|
|
@ -152,7 +152,6 @@ export default function Layout(props: ParentProps) {
|
||||||
const openEditor = (id: string, value: string) => {
|
const openEditor = (id: string, value: string) => {
|
||||||
if (!id) return
|
if (!id) return
|
||||||
setEditor({ active: id, value })
|
setEditor({ active: id, value })
|
||||||
queueMicrotask(() => editorRef.current?.focus())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEditor = () => setEditor({ active: "", value: "" })
|
const closeEditor = () => setEditor({ active: "", value: "" })
|
||||||
|
|
@ -221,6 +220,7 @@ export default function Layout(props: ParentProps) {
|
||||||
<InlineInput
|
<InlineInput
|
||||||
ref={(el) => {
|
ref={(el) => {
|
||||||
editorRef.current = el
|
editorRef.current = el
|
||||||
|
requestAnimationFrame(() => el.focus())
|
||||||
}}
|
}}
|
||||||
value={editorValue()}
|
value={editorValue()}
|
||||||
class={props.class}
|
class={props.class}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue