diff options
author | bobzel <zzzman@gmail.com> | 2024-03-27 19:22:26 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-03-27 19:22:26 -0400 |
commit | 9b2cfea0c13fef048ba6ae3d5281d1eea836e9b3 (patch) | |
tree | 608ad43770de1276afacf0f8a4fb36922bf2f17b /src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts | |
parent | 00367534e4a61eea788beffedaa0bc266ea3aa16 (diff) |
preserve nodeSelections after onBlur by not calling autoLink. fix promoting text to list cursor locatoin
Diffstat (limited to 'src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts')
-rw-r--r-- | src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts index 87eee1b2f..ab49a53ea 100644 --- a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts +++ b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts @@ -107,7 +107,8 @@ export function buildKeymap<S extends Schema<any>>(schema: S, props: any, mapKey // when promoting to a list, assume list will format things so don't copy the stored marks. marks && tx3.ensureMarks([...marks]); marks && tx3.setStoredMarks([...marks]); - dispatch(tx3); + const tx4 = tx3.setSelection(TextSelection.near(tx3.doc.resolve(state.selection.to + 2))); + dispatch(tx4); }) ) { console.log('bullet promote fail'); |