On a Mac, create a text replacement (e.g., $alpha → 𝛼) in System Settings
In Obsidian, in any note, create a heading line (# Heading)
On the line above the heading, type your text replacement trigger but don’t press space (so you still see the little replacement window thing)
Press the delete key
Expected result
Just the last character you typed gets deleted
Actual result
The text replacement gets inserted, and the heading gets deleted.
Environment
SYSTEM INFO:
Obsidian version: v1.5.6
Installer version: v1.4.16
Operating system: Darwin Kernel Version 23.3.0: Wed Dec 20 21:33:31 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8112 23.3.0
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
This may be a bug of MacOS, we have no control over text replacement. It’s something that is acted upon Obsidian by OS emulating keyboard or mouse input.
Still a problem after reinstalling with installer version 1.6.3, in sandbox vault.
If the replacement is above a header, it will delete the entire header line.
If the replacement is above plain text, it will delete the remaining line and line break that replacement is on (moving the line below it up)
Typing a >= 2 character text replacement and then hitting the delete key deletes a heading and its collapsed content on the next line
Typing a 1 character text replacement and then hitting the delete key and then clicking the left mouse button deletes a heading and its collapsed content on the next line
Typing a >=2 character text replacement and then hitting the delete key deletes a bulleted item on the next line
Typing a >=2 character text replacement and then hitting the delete key deletes a bulleted item and its collapsed content on the next line
I had a significant déjà vu moment months ago where I was typing something in my notes, thought I had written the same thing before, went into File recovery and then found a whole heading with said information contained in it that had already been written. I had thought I had cut the deleted heading and its contents to move them somewhere else and then never pasted them, but after a similar phenomenon happened to me again a moment ago where I was typing at speed and saw a whole heading and its content disappear, undoing and redoing the mass deletion before understanding what was happening, I think typing a text replacement and hitting the delete key in this manner may have actually been the culprit since I don’t generally cut and paste in Obsidian.