Skip to content

fix(editor): focus first row when inserting a table via /table - #602

Open
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:fix/table-focus-first-row
Open

fix(editor): focus first row when inserting a table via /table#602
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:fix/table-focus-first-row

Conversation

@junereycasuga

Copy link
Copy Markdown
Contributor

When inserting a table with /table, focus now lands in the first header cell instead of being left after the block widget.

Changes:

  • Added focusTableCell(view, tableFrom, row, col) helper in cm-table.ts.
  • Updated /table slash command in cm-slash-commands.ts to focus the first header cell once the widget renders.
  • Updated test in cm-slash-commands.test.ts to assert the first header cell is focused.

Tested:

  • npm run test:run --workspace @zennotes/app-core -- cm-slash-commands.test.ts
  • npm run typecheck --workspace @zennotes/app-core

Before:

Cap.2026-08-15.at.12.00.21.mp4

After:

Cap.2026-08-15.at.11.57.30.mp4

@junereycasuga
junereycasuga force-pushed the fix/table-focus-first-row branch from 9f7752c to d352dec Compare August 18, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant