Steps to reproduce
This bug happens with either inline or display math. These steps are just for inline math.
Type some text followed by inline math with optional text after the inline math for example:
Here is some text and math $a+b=c$ and more text.
Add more text before the inline math. In this example, move the cursor to directly after “some” and add the words " extra words added to the". The result should be:
Here is some extra words added to the text and math $a+b=c$ and more text.
Now click on the inline math. Instead of highlighting the Latex that corresponds to the math, the letters “ed to” at the end of “added to” are highlighted.
Did you follow the troubleshooting guide? [Y/N]
Y
This bug is reproducible in the sandbox vault with no plugins enabled.
Expected result
When clicking the inline math preview, you expect the text corresponding to the inline math to be highlighted.
Actual result
Instead the text which is at the same index that the inline math was before step 2 is highlighted.
Environment
SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.10
Operating system: Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 20.6.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 0
RECOMMENDATIONS:
none
Additional information
This behavior is temporarily fixed after switching to a different obsidian tab and back again. It is also reset only for a given math block if you use the arrow keys to navigate inside the math block.
I originally thought this was a bug with Latex Suite. A video of me recreating this bug can be found on my Latex Suite bug report with the same title as this one.