Tables smash after a window-focus change

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Create a new table with at least 2 columns
  2. Give each column a random name
  3. Start to enter a text to column 1 in the first row
  4. Switch to another window by using ALT+TAB and then switch back to Obisdian by also using ALT+TAB
  5. Just type the next letters and the whole table is smashed

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

Yes, it is easily reproducable in vault too.

Expected result

I want to finish the text in row1/column1 once I switch back to the table. This is a very common usecase for me to collect info from other windows. I had to reconstruct several tables from scratch until I was able to reproduce it and found the cause.

Actual result

The table is smashed and has lost its markdown table-format. It is just a bunch of letters and | chars left.

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.10
Operating system: Windows 11 Pro 10.0.26100
Login status: not logged in
Language: de
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: Things v2.1.20
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.


Additional information

It is easy to reproduce and just happen if you have your focus not on the last column.
Possible root cause: Once I start to write in row1, Obsidians focus is set to “in-table” (where it considers about the table markdown), then I switch to another random window but when I switch back Obsidians focus is not “in-table” anymore and somewhere in text-mode. Therefore every further typed character is overwriting the markdown-structure of the tables | and destroys it.

I can’t reproduce this.

Download and reinstall Obsidian. Make a screen recording of this happening in the sandbox vault, upload it somewhere and add link here using inline code

To help us understand better this issue, take a screenshot of your broken table in source view.

To check the integrity of tables, you can write: (please note the blank line before AND after the table and a whitespace between pipe strings inside a table)

Text

| a | b | c |
| --- | --- | --- |

Text

Also, if you use pipe strings in your cells, take care to escape them in your cells “|” like so: “\|” because tables uses pipe strings as well. Generally, Obsidian escapes special strings automatically.