Преглед изворни кода

fix(prompt-editor): resolve initial cursor position and auto-newline … (#8511)

### What problem does this PR solve?

In web folder's prompt-editor component, when entering content for the
first time, the cursor position is abnormal and it will automatically
wrap

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: leonlai <owllai123456>
tags/v0.20.0
FatMii пре 4 месеци
родитељ
комит
2990779d59
No account linked to committer's email address
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3
    0
      web/src/components/prompt-editor/variable-picker-plugin.tsx

+ 3
- 0
web/src/components/prompt-editor/variable-picker-plugin.tsx Прегледај датотеку

@@ -224,6 +224,9 @@ export default function VariablePickerMenuPlugin({
}

$getRoot().clear().append(paragraph);
if ($isRangeSelection($getSelection())) {
$getRoot().selectEnd();
}
},
[findLabelByValue],
);

Loading…
Откажи
Сачувај