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:
parent
8a53728edd
commit
28d95002b5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue