Skip to content

Fix Grid Keyboard Navigation and Focus Layout Shift #8980

@tobiu

Description

@tobiu

Problem: Keyboard navigation in the grid is broken. Selecting a row or cell no longer triggers focus on the grid body wrapper, preventing KeyNavigation from capturing arrow key events. Additionally, focusing the body wrapper manually causes a layout shift where the header toolbar is scrolled out of view.

Scope:

  1. Focus Restoration: Ensure GridBody receives focus on row/cell clicks.
  2. Layout Stability: Implement preventScroll support for focus() to stop the browser from scrolling the parent container.

Changes Required:

  • src/main/DomAccess.mjs: Update focus to support preventScroll.
  • src/component/Base.mjs: Update focus signature to pass preventScroll.
  • src/grid/Body.mjs: Call this.focus(this.vdom.id, false, true) in onRowClick.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions