瀏覽代碼

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
沒有連結到貢獻者的電子郵件帳戶。
共有 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…
取消
儲存