When you first open a note in edit-view (and the cursor + keyboard are hidden)…scroll down a few window lengths, then Tap a line/character…
The screen jumps to the TOP of the note, and the cursor (caret) appears before the first character of the note (instead of where you tapped).
Expected result
The cursor would move directly to the Tap location. (The way it is on desktop - you just click where you want to type and the cursor moves to that line/character)
Actual result
The cursor appears at the very TOP of the note (before the first character).
Additional information
The cursor WILL move to the Tap location IF the text-input area is already active (cursor flashing, keyboard visible).
However, when reading/scrolling a note in editor mode (keyboard/cursor not visible), tapping the screen ‘jumps’ the cursor (and view area) to the TOP of the note (not to the location of the new Tap).
I have already disabled all themes and non-default plugins.
This may be an iOS specific bug. I am using iOS version 12.5.4 (iphone)
Is there some reason the cursor-position bug only happens on iOS?
(because it seems to function properly on Android).
Perhaps the doc.setCursor(pos: {line, ch}) method could handle this.
from the codemirror docs:
doc.setCursor sets the cursor position. You can either pass a single {line, ch} object, or the line and the character as two separate parameters. It will replace all selections with a single, empty selection at the given position.
Uh, if it is indeed a bug, then I think the Devs should address it. If it’s a Feature Request than I think the Devs should address it! Or maybe we are the only two iOS/iPadOS users.