Desktop: simple insertion of one character could erase a whole inline math expression at another position

I think that this bug is kinda severe, since it causes unwanted information loss/corruptions.

Steps to reproduce

  1. Create a new sandbox. Default settings. For debugging purposes (other cases are already tested), switch off spell-checks, grammar auto-completes, smart lists, HTML auto-converts, etc. Switch off all core plugins except for File List. No community plugins.
  2. Create a new note with the following content:
$\gamma$abc$\gamma$
$\gamma$
  1. Close the sandbox vault then re-open it
  2. Open that new note in Live Preview mode. Use Home, End and Shift keys to select the first line. Ctrl-C copy it. Press End key then Enter, Ctrl-V paste it to the second line.
  3. Mouse click between “a” and “b”, or between “b” and “c” of the new second line. Keyboard insert a random character a-z

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

A simple insertion of one charater, nothing less, nothing more

Actual result

One or two of the $\gamma$ on the new second line gets erased.
You can replace $\gamma$ by a whole equation like $\gamma=\alpha\beta$. Then you’ll experience a whole equation disappearance.
Placing spaces between $\gamma$ and “abc” won’t help.
More texts around these two lines won’t help, so I debug and reduce the testcase to this minimal setup.

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.6.7
Operating system: Windows 10 Home 10.0.19045
Login status: logged in
Language: zh
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Duplicate of