Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab and Enter does not work/breaks the table in live preview and source mode #147

Closed
my4ng opened this issue Dec 29, 2021 · 6 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@my4ng
Copy link

my4ng commented Dec 29, 2021

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:

  1. Enter live preview mode and create a new note
  2. Create a table by typing "| A | A [enter]"
  3. 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.

Screenshots
Tab
image
Enter
image

Desktop:

  • OS: Windows 11 22000.376
  • Obsidian Version: v0.13.14
  • Advanced Tables Version: v0.15.0
@my4ng my4ng added bug Something isn't working needs-review A newly created issue that has not yet been processed labels Dec 29, 2021
@ReynoZ
Copy link

ReynoZ commented Dec 31, 2021

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.

@my4ng
Copy link
Author

my4ng commented Dec 31, 2021

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.

@CarlosSMA
Copy link

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

@Elaws
Copy link

Elaws commented Jan 2, 2022

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.

@tgrosinger
Copy link
Owner

Duplicate of #155 which is now resolved. Thank you for the bug report.

@tgrosinger tgrosinger added duplicate This issue or pull request already exists and removed needs-review A newly created issue that has not yet been processed labels Jan 14, 2022
@chiumax
Copy link

chiumax commented Feb 2, 2022

i still get this issue even on a fresh install. but the hack-ish solution @ReynoZ mentioned works

EDIT: disregard, some custom config of mine induced breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants