Text cursor becomes invisible after switching to Source mode with an image selected

Environment

  • Windows
  • Obsidian 1.14.5; installer version 1.12.7
  • Default theme, no community plugins, no CSS snippets

Steps to reproduce

  1. Create a note containing an embedded image and some plain text.
  2. In Live Preview, click the image to select it.
  3. Switch to Source mode.
  4. Click the plain text to position the text cursor.

Expected result

The text cursor should be visible.

Actual result

The text cursor remains invisible even though the editor has focus.

Additional information

The editor retains the mod-image-selected class after switching to Source mode. Obsidian’s built-in CSS consequently sets caret-color: transparent. Removing the stale class restores the cursor.

Workaround

Switch back to Live Preview, click some plain text to deselect the image, then switch to Source mode again. The cursor becomes visible.