diff options
author | bobzel <zzzman@gmail.com> | 2024-04-04 16:35:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-04 16:35:37 -0400 |
commit | e5cee5d17266a0f93201ab61cab01d629394e013 (patch) | |
tree | 7fac6e96ed7c8b9be87b92da6cfbb734747bf01c /src | |
parent | 6704c128dc66ab9d7654785f4f1f6664cf68b3c0 (diff) |
fixed splitting lists on enter on any blank top-level node
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts index 1c0738bd3..03c902580 100644 --- a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts +++ b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts @@ -313,7 +313,7 @@ export function buildKeymap<S extends Schema<any>>(schema: S, props: any, mapKey const liNode = view.state.selection.$anchor.node(-1); // prettier-ignore if (liNode?.type === schema.nodes.list_item && !liNode.textContent && - olNode?.type === schema.nodes.ordered_list && olNode.lastChild === liNode && once && view.state.selection.$from.depth === 3) + olNode?.type === schema.nodes.ordered_list && once && view.state.selection.$from.depth === 3) { // handles case of hitting enter at then end of a top-level empty list item - the result is to create a paragraph for (let i = 0; i < 10 && view.state.selection.$from.depth > 1 && liftListItem(schema.nodes.list_item)(view.state, view.dispatch); i++); |