iOS Select All command doesn’t work in notes with YAML front matter

The touchscreen Select All command no longer works properly in notes that contain YAML front matter. Instead of selecting the entire text, it merely moves the cursor to the beginning of the note. A few details:

  • The issue only occurs in notes with YAML front matter, and isn’t triggered by other kinds of code blocks.

  • Rather than selecting all text, Select All merely moves the cursor to the beginning of the note.

  • The bug is specific to Obsidian (or Capacitor). Select All works normally when the same notes with YAML front matter are opened in 1Writer and iA Writer.

Steps to reproduce

  1. Open a note containing YAML front matter in the iOS version of Obsidian.

  2. Trigger the iOS Select All command by tapping or holding the cursor anywhere in the note.

  3. Tap “Select All” in the pop-up menu.

Expected result

All text in the note is selected.

Actual result

The cursor moves to the beginning of the note and no text is selected.

Environment

The bug has been confirmed to occur on at least two devices running two different versions of iOS:

  • iPhone 13 running iOS 15.6.1
  • iPhone Xs Max running iOS 16.0.3

Additional information

Another user posted a screencast of the bug’s behavior on the Discord.