fix: add scrollIntoView for insertContent

This commit is contained in:
Philipp Kühn 2021-04-09 10:45:23 +02:00
parent a5794e7c00
commit e7fe7248af

View File

@ -19,6 +19,7 @@ export const insertContent: RawCommands['insertContent'] = value => ({ tr, dispa
if (typeof content === 'string') {
tr.insertText(content)
tr.scrollIntoView()
return true
}
@ -29,6 +30,7 @@ export const insertContent: RawCommands['insertContent'] = value => ({ tr, dispa
tr.insert(tr.selection.anchor, content)
selectionToInsertionEnd(tr, tr.steps.length - 1, -1)
tr.scrollIntoView()
}
return true