Android: Can't scroll when an external keyboard is connected

If a physical keyboard is connected to the phone, you can’t scroll around the document as the view gets recentered to the cursor the moment you scroll. Sometimes you can’t scroll at all, sometimes you can for a few seconds but then it jumps back to the cursor.

Note: same behavior regardless if I scroll around using the touchscreen vs an external mouse. The keyboard being connected is what breaks this.

Steps to reproduce

  1. Connect an external keyboard (Keychron K3 Pro) to the phone
  2. Open a long note in Obsidian
  3. Scroll down and put the cursor towards the end of the document (as if you’re writing at the end)
  4. Scroll up all the way to the top so that the cursor is not on screen anymore
  5. Now try scrolling down by just one line

Did you follow the troubleshooting guide?

Yes.

Expected result

Scrolling works the same if an external keyboard is connected.

Actual result

Observe you can’t scroll down as the view jumped all the way back to put the cursor on screen

Environment

SYSTEM INFO:
Obsidian version: 1.12.7 (303)
API version: 1.12.7
Operating system: Android 16 (Google Pixel 9 Pro XL)
Webview version: 148.0.7778.215
Login status: logged in
Language: en
Catalyst license: none
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 1
Restricted mode: on


Additional information

Keyboard Event Viewer doesn’t show any key events coming from the keyboard when not typing

thanks

Hi, we had a similar report involving our Android IME, Pastiera

In our case, the symptoms appeared in Obsidian, but the underlying issue was on our side. Pastiera did not correctly respect Android’s decision to hide the software input view when a physical keyboard was connected. This could leave the IME window affecting the app’s viewport and touch behavior.

We have fixed this in the latest Pastiera nightly by honoring Android’s input-view visibility decision, using only the compact candidates/status view in hardware-keyboard mode, and limiting our IME inset adjustments to that mode.

I don’t know whether Thomas was using Pastiera, or whether this report has the same root cause, so I would not conclude that this is necessarily an Obsidian issue. But the similar setup and symptoms seemed worth mentioning.

@thomas2023, do you happen to remember which Android keyboard/IME was active? If it was Pastiera, could you try the latest nightly? (available shortly)

For me this bug reproduces with GBoard and FUTO keyboard. But only in Obsidian, a <textarea> in Chrome don’t have this behavior, for example.

I haven’t tried any other IMEs.

For anyone else reading: I figured out that if you exit the editing mode by swiping left/right a bit to pull out the side panel (this changes the bottom toolbar from the text editing one to the general one), you can then scroll normally through the document. However, it does not persist the cursor position when you want to edit again.