Skip to content

Commit

Permalink
fix check taskItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgbn committed Jan 11, 2022
1 parent e0d7b01 commit 098a3fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/extension-task-item/src/task-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const TaskItem = Node.create<TaskItemOptions>({
const checkboxStyler = document.createElement('span')
const checkbox = document.createElement('input')
const content = document.createElement('div')
const nodePosition = getPos()

checkboxWrapper.contentEditable = 'false'
checkbox.type = 'checkbox'
Expand All @@ -101,7 +102,7 @@ export const TaskItem = Node.create<TaskItemOptions>({
.chain()
.focus()
.command(({ tr }) => {
tr.setNodeMarkup(getPos(), undefined, {
tr.setNodeMarkup(nodePosition, undefined, {
checked,
})

Expand Down

0 comments on commit 098a3fc

Please sign in to comment.