diff --git a/web/src/components/prompt-editor/variable-picker-plugin.tsx b/web/src/components/prompt-editor/variable-picker-plugin.tsx index 7aeb798b6..6e92d14f9 100644 --- a/web/src/components/prompt-editor/variable-picker-plugin.tsx +++ b/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], );