[Bug] Cursor does not move to Tap location (editor mode)


[x] iOS - [ ] Android - Obsidian 1.0.4

Visual Description:

Steps to reproduce

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

  1. 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).
  1. I have already disabled all themes and non-default plugins.

  2. This may be an iOS specific bug. I am using iOS version 12.5.4 (iphone)

- Do you have the same issue?

- Is there a way to correct the cursor location?

1 Like

Same here.

1 Like

Are you also on iOS?

Someone in the discord reported that “Tap > caret location” behaves correctly on Android (so this may be an iOS-specific glitch).

Yes I am.

1 Like

Before I try building a plugin to fix this ^ :

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.

doc.setCursor(pos: {line, ch}|number, ?ch: number, ?options: object)

Unless there is some reason it won’t work on iOS.

Truly, Obsidian is one of the coolest apps I’ve seen :smiling_face_with_three_hearts:.

I appreciate all the work that’s been done so far, and submit this bug as a big (and perhaps simple?) improvement to the iOS experience.

It could be good to fix - before a bunch of new iOS users download Obsidian (since Cursor control is pretty crucial in a note app).


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. :smirk:

This was never fixed right? is still happening on ipados here.

1 Like

(1) Not that I’m aware!
(2) Yes!!

1 Like

This issue seems to be FIXED in the new release of Obsidian Mobile 1.4.0 (iOS).

The cursor now moves to the EXACT tap location (even to the middle of a line, even after scrolling multiple screen lengths).

@Daveb08 @concentration - Is this issue also fixed for you?

If so, I’ll mark this as solved.

Thank you again for responding :dove:

[NOTE: this is on iOS 15.6]

It’s working so far. Thank you

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.