Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into app-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh authored Feb 23, 2024
2 parents edf5b10 + b097860 commit 0319bd8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const BlockManipulationExtension = Extension.create({
const selection = NodeSelection.create(view.state.doc, nodePos)
tr = tr.setSelection(selection)
view.dispatch(tr)
view.focus()
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getGroupInfoFromPos(
group,
container,
depth,
level: (maxDepth - 1) / 2,
level: Math.ceil((maxDepth - 1) / 2),
$pos,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -702,16 +702,13 @@ export const BlockContainer = Node.create<{
const posAddition =
container.type.name === 'blockContainer' ? -1 : 0

if (newLevel !== child.attrs.listLevel)
state.tr.setNodeMarkup(
if (newLevel !== child.attrs.listLevel) {
state.tr.setNodeAttribute(
groupPos.start() + pos + posAddition,
null,
{
...child.attrs,
listType: listType,
listLevel: newLevel,
},
'listLevel',
newLevel,
)
}
}
})
return true
Expand Down Expand Up @@ -1329,6 +1326,8 @@ export const BlockContainer = Node.create<{
state,
)

if (group.attrs.listType === 'div') return false

if (container) {
setTimeout(() => {
this.editor.commands.UpdateGroupChildren(
Expand Down

0 comments on commit 0319bd8

Please sign in to comment.