Fixed error when clicking on snippets in card menu

no issue

- click event was clearing the editor range so it's necessary to reposition the cursor before replacing with the post
This commit is contained in:
Kevin Ansfield 2020-10-20 18:10:02 +01:00
parent 8a53728edd
commit 28d95002b5
1 changed files with 2 additions and 0 deletions

View File

@ -570,6 +570,8 @@ export default Component.extend({
let {editor} = this;
let {head: {section}} = range;
editor.selectRange(range);
editor.run((postEditor) => {
let nextPosition = postEditor.deleteRange(section.toRange());
postEditor.setRange(nextPosition);