Skip to content

Commit

Permalink
bug: editor loses focus after insert
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Nov 13, 2024
1 parent 847b783 commit 6f231ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import {INSERT_LAYOUT_COMMAND} from '../../../core/plugins/ColumnsLayout/LayoutItemNode.js';
import DropDownItem from '../../generic/dropdown/DropDownItem.svelte';
import DropDown from '../../generic/dropdown/DropDown.svelte';
import {tick} from 'svelte';
const editor = getEditor();
const activeEditor = getActiveEditor();
Expand All @@ -16,8 +17,9 @@
showModal = true;
}
function close() {
async function close() {
showModal = false;
await tick();
getCommands().FocusEditor.execute(editor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import ModalDialog from '../../generic/dialog/ModalDialog.svelte';
import {getCommands} from '$lib/core/commands.js';
import NumberInput from '$lib/components/generic/input/NumberInput.svelte';
import {tick} from 'svelte';
let rows = '5';
let columns = '5';
let isDisabled = true;
Expand All @@ -26,8 +26,9 @@
showModal = true;
}
function close() {
async function close() {
showModal = false;
await tick();
getCommands().FocusEditor.execute($activeEditor);
}
Expand Down

0 comments on commit 6f231ba

Please sign in to comment.