Skip to content

/table insert leaves focus inside the first header cell instead of after the table widget #663

Closed

Description

@junereycasuga

Description:
When inserting a table via the /table slash command, the editor focus is moved into the first header cell of the newly inserted table. The expected behavior is for focus to land after the table block widget, so the user can continue typing in the body of the note without first escaping the table.

Steps to reproduce

  1. Open any note in ZenNotes.
  2. Type /table and select the table slash command.
  3. Observe where the cursor/focus ends up.

Expected behavior
Focus should be placed immediately after the newly inserted table block widget, leaving the table empty but not active.

Actual behavior
Focus is placed inside the first header cell of the table, requiring an extra key interaction (e.g. Esc or arrow navigation) to exit the table and continue writing.

Additional context
This affects the keyboard-first flow because /table interrupts note writing instead of acting like a passthrough block insert.

Activity

  1. adibhanna commented on Aug 23, 2026

    @adibhanna
    Contributor

    Fixed on the v2.36.0 release branch in 24448dc.

    The slash command left only one newline after the generated GFM table. The next text typed on the apparent continuation line was therefore parsed as another table row, which rebuilt the widget and displaced the DOM selection. The insertion now reserves a real blank separator and a continuation line, including when content already follows the insertion point.

    Verification:

    • app-core typecheck passed
    • 63 slash-command, table, and WYSIWYG tests passed
    • rebuilt desktop app verified over CDP: the table remains four cells, focus stays in the main editor, and Continues below the table. persists as a separate paragraph
    • demo recorded locally as docs/releases/v2.36.0/media/table-insert-focus-663.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions