Phenomenon
When editing a table cell in a contenteditable element, pressing Tab inserts a tab character instead of moving to the next cell. This makes table navigation difficult.
Reproduction example
- Create a table in contenteditable
- Click inside a table cell
- Press Tab key
Observed behavior
- Tab character is inserted into the cell
- Cursor does not move to next cell
- Table navigation is broken
- Users cannot easily navigate between cells
Expected behavior
- Tab should move to next cell
- Shift+Tab should move to previous cell
- Tab character should not be inserted
- Navigation should work like spreadsheet applications
Browser Comparison
- All browsers: Tab inserts character (default behavior)
- Custom handling needed for table navigation
Notes and possible direction for workarounds
- Intercept Tab key in table cells
- Prevent default behavior
- Find next/previous cell
- Move cursor to next cell
- Handle edge cases (last cell, first cell)