fix: use text input for local edit prompts
This commit is contained in:
parent
87a1514a0f
commit
9ebac8b079
@ -2063,7 +2063,7 @@ export function ImageNode({
|
||||
const toolbarRef = useRef<HTMLDivElement>(null);
|
||||
const boxCutoutToolbarRef = useRef<HTMLDivElement>(null);
|
||||
const localEditPromptInputRefs = useRef<
|
||||
Record<string, HTMLTextAreaElement | null>
|
||||
Record<string, HTMLInputElement | null>
|
||||
>({});
|
||||
const localEditPromptDraftRefs = useRef<Record<string, string>>({});
|
||||
const localEditRegionsRef = useRef<LocalEditRegion[]>(localEditRegions);
|
||||
@ -8113,9 +8113,9 @@ export function ImageNode({
|
||||
>
|
||||
<div className="flex items-center gap-1.5">
|
||||
{isEditing ? (
|
||||
<textarea
|
||||
<input
|
||||
autoFocus={editingLocalEditRegionId === region.id}
|
||||
className="nodrag nopan nowheel h-9 min-w-0 flex-1 resize-none overflow-hidden rounded-full border border-slate-300 bg-white/95 px-3 py-2 text-[12px] font-medium leading-5 text-slate-950 caret-slate-950 shadow-[0_10px_24px_rgba(15,23,42,0.14)] outline-none ring-2 ring-transparent transition placeholder:text-slate-400 focus:border-slate-950 focus:ring-slate-950/15 dark:border-white/20 dark:bg-slate-950/88 dark:text-white dark:caret-white dark:placeholder:text-white/42 dark:focus:border-white/40 dark:focus:ring-white/18"
|
||||
className="nodrag nopan nowheel h-9 min-w-0 flex-1 rounded-full border border-slate-300 bg-white/95 px-3 text-[12px] font-medium leading-5 text-slate-950 caret-slate-950 shadow-[0_10px_24px_rgba(15,23,42,0.14)] outline-none ring-2 ring-transparent transition placeholder:text-slate-400 focus:border-slate-950 focus:ring-slate-950/15 dark:border-white/20 dark:bg-slate-950/88 dark:text-white dark:caret-white dark:placeholder:text-white/42 dark:focus:border-white/40 dark:focus:ring-white/18"
|
||||
data-canvas-no-drag="true"
|
||||
data-local-edit-control="true"
|
||||
autoComplete="off"
|
||||
@ -8186,8 +8186,8 @@ export function ImageNode({
|
||||
ref={(input) => {
|
||||
localEditPromptInputRefs.current[region.id] = input;
|
||||
}}
|
||||
rows={1}
|
||||
spellCheck={false}
|
||||
type="text"
|
||||
/>
|
||||
) : (
|
||||
<button
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user