Skip to content

Fix Grid Scrollbar Position and DragScroll ID Mismatch #8983

@tobiu

Description

@tobiu

Problem:

  1. Vertical Scrollbar moves horizontally: The vertical scrollbar scrolls with the content instead of staying pinned.
  2. GridDragScroll Regression: Horizontal drag scrolling is broken because ScrollManager passes the Component ID (id) instead of the rendered DOM ID (id__wrapper) to the GridDragScroll addon.

Fix:

  1. Revert to overflow-y: hidden: We changed resources/scss/src/grid/Container.scss from overflow-y: clip back to overflow-y: hidden on the inner .neo-grid-container.
    • Rationale: clip forces the parent wrapper (which has overflow-x: auto) to handle the scrolling. Since the vertical scrollbar is an absolute child of that wrapper, it scrolls away with the content. hidden creates a new Block Formatting Context (BFC) / Scroll Container on the inner element, trapping the wide content inside. This means the inner element scrolls, while the wrapper (and the scrollbar pinned to it) stays static.
  2. Focus Scroll Prevention: The reason we originally moved to clip was to prevent the browser from scrolling the grid body into view when focused (which sometimes pushed headers out). We solved this properly in src/grid/Body.mjs by passing {preventScroll: true} to the focus() method in onRowClick.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions