fix(context): fix input

This commit is contained in:
2026-03-23 13:36:54 +08:00
parent c5c5757f5a
commit 59aeb0bf39

View File

@@ -2041,6 +2041,7 @@ const PaperContainer = (
const contextMenu = useMemo(() => {
let operationSchema = getOperationSchema(operationId)
const currentType = useTopToolsStore.getState().currentTimeKey
const textCommentsInputProps = form.getInputProps("text_comments")
return (
<Card
@@ -2134,9 +2135,15 @@ const PaperContainer = (
minRows={2}
maxRows={2}
disabled={currentType === "label"}
onFocus={() => useKeyEventStore.getState().setFocusInput(true)}
onBlur={() => useKeyEventStore.getState().setFocusInput(false)}
{...form.getInputProps("text_comments")}
{...textCommentsInputProps}
onFocus={(event) => {
textCommentsInputProps.onFocus?.(event)
useKeyEventStore.getState().setFocusInput(true)
}}
onBlur={(event) => {
textCommentsInputProps.onBlur?.(event)
useKeyEventStore.getState().setFocusInput(false)
}}
/>
</Box>
<Box
@@ -2299,6 +2306,7 @@ const PaperContainer = (
id,
ids,
operationId,
form.values,
position.left,
position.top,
renderSubAttrLabel,