diff options
| author | bobzel <zzzman@gmail.com> | 2024-03-27 15:42:12 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-03-27 15:42:12 -0400 |
| commit | 1d47f6cc8be84ab368ad91f287909ee162d1f2e2 (patch) | |
| tree | fcff965f56653aae7bcd2058f36becf0bad5440e /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
| parent | 3bf4c1e7e9e34b2f4730e3df504ef06c36d05a9e (diff) | |
fixed toggling footnotes. fixed error in bullet hit test. fixed problems with backspace and enter in prosemirror transfer. fixed display of markdown options to start at top.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
| -rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 729c4d534..9882a9be9 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1685,7 +1685,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB $olistPos = this._editorView?.state.doc.resolve(($olistPos as any).path[($olistPos as any).path.length - 4]); } } - const listPos = this._editorView?.state.doc.resolve(clickPosVal === olistPos ? clickPosVal + 1 : clickPosVal); + const maxSize = this._editorView?.state.doc.content.size ?? 0; + const listPos = this._editorView?.state.doc.resolve(Math.min(maxSize, clickPosVal === olistPos ? clickPosVal + 1 : clickPosVal)); const listNode = listPos?.node(); if (olistNode && olistNode.type === this._editorView?.state.schema.nodes.ordered_list && listNode) { if (!highlightOnly) { |
