Tab and Enter does not work/breaks the table in live preview and source mode
my4ng opened this issue · comments
Describe the bug
In live preview mode and source mode, after the table is created, pressing tab in a bottom cell whose width is shorter than the one above loses the cursor and nothing happens. When enter is pressed in a bottom cell whose width is less or equal to the longest cell above, the table breaks as the rest of row is moved to the next line (as with the cursor).
To Reproduce
Steps to reproduce the behavior:
- Enter live preview mode and create a new note
- Create a table by typing "| A | A [enter]"
- Type "A"
a. Type "[tab]" loses the cursor
b. Type "[enter]" moves the two pipes ("|") to the next line
Expected behavior
Tab should go to the next cell, and Enter should go to the next (new) line.
Desktop:
- OS: Windows 11 22000.376
- Obsidian Version: v0.13.14
- Advanced Tables Version: v0.15.0
Hi, I have encountered the same issue and I figured a way out afterwards.
Try adding some characters above and below where you want to create your table. And then "Tab"&"Enter" function properly.
In other words, the plug-in works only when the table is created BETWEEN two lines that are not blank.
I'm not sure it is a bug or not. My solution is a bit wierd but it works fortunately.
Thank you @ReynoZ. After some trial and error, I found that the conditions you mentioned can actually be relaxed at little, such that as long as there is something below the table (even a blank line), both "Tab" and "Enter" work as intended.
I am not sure if this was an issue before the live preview update, but nevertheless this is a buggy behaviour that should be fixed, since more times then not the table being edited is the last part of the note, and remembering to add something below is always a nuisance.
Same happens with the Linux version, and the workaround that @michaelyang02 talked about also fixes this issue.
Desktop:
- OS: Debian 11.2
- Obsidian version: 0.13.14 (Flatpak)
- Advanced Tables Version: 0.15.0
Same behavior here on Windows with Obsidian 0.13.14.
Thank you @michaelyang02 for the workaround !
This should be fixed though since a bit annoying.
Duplicate of #155 which is now resolved. Thank you for the bug report.