feat: add scrollIntoView option to focus command, fix #2172

This commit is contained in:
Philipp Kühn
2021-11-25 17:18:30 +01:00
parent 62197ce459
commit e0f64904b6
3 changed files with 21 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ export const TaskItem = Node.create<TaskItemOptions>({
if (editor.isEditable && typeof getPos === 'function') {
editor
.chain()
.focus()
.focus(undefined, { scrollIntoView: false })
.command(({ tr }) => {
tr.setNodeMarkup(getPos(), undefined, {
checked,