1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Mobile: Fixes #9532: Fix cursor location on opening the editor and attachments inserted in wrong location (#9536)

This commit is contained in:
Henry Heino
2023-12-17 12:58:22 -08:00
committed by GitHub
parent 815a0a5db4
commit d4157e14fe
2 changed files with 15 additions and 11 deletions

View File

@ -270,6 +270,7 @@ function NoteEditor(props: Props, ref: any) {
const setInitialSelectionJS = props.initialSelection ? `
cm.select(${props.initialSelection.start}, ${props.initialSelection.end});
cm.execCommand('scrollSelectionIntoView');
` : '';
const editorSettings: EditorSettings = {
@ -331,6 +332,7 @@ function NoteEditor(props: Props, ref: any) {
const settings = ${JSON.stringify(editorSettings)};
cm = codeMirrorBundle.initCodeMirror(parentElement, initialText, settings);
${setInitialSelectionJS}
window.onresize = () => {