You've already forked joplin
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:
@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user