Skip to content
Snippets Groups Projects
Commit 92a76df4 authored by Dennis Collaris's avatar Dennis Collaris Committed by Leonardo Christino
Browse files

fix: focus editor before inserting

parent 22d6ed9d
No related branches found
Tags v1.104.1
1 merge request!277fix: focus editor before inserting
Pipeline #140424 passed
...@@ -12,6 +12,9 @@ export const InsertVariablesPlugin = () => { ...@@ -12,6 +12,9 @@ export const InsertVariablesPlugin = () => {
const onChange = (value: string | number, type: VariableType) => { const onChange = (value: string | number, type: VariableType) => {
editor.update(() => { editor.update(() => {
const editorElement = document.querySelector('.editor > div') as HTMLDivElement;
editorElement?.focus();
const selection = $getSelection() as BaseSelection; const selection = $getSelection() as BaseSelection;
const node = new VariableNode(String(value), type); const node = new VariableNode(String(value), type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment