fix(ui5-table): keep focused cell visible next to sticky columns#13850
Open
aborjinik wants to merge 1 commit into
Open
fix(ui5-table): keep focused cell visible next to sticky columns#13850aborjinik wants to merge 1 commit into
aborjinik wants to merge 1 commit into
Conversation
aborjinik
temporarily deployed
to
netlify-preview
July 21, 2026 11:49 — with
GitHub Actions
Inactive
|
🚀 Deployed on https://pr-13850--ui5-webcomponents-preview.netlify.app |
aborjinik
force-pushed
the
table-scroll-element-into-view
branch
from
July 22, 2026 12:07
c6ceb31 to
c7ecef2
Compare
aborjinik
temporarily deployed
to
netlify-preview
July 22, 2026 12:07 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When navigating in overflowMode="Scroll", a focused cell or row could end up hidden behind a sticky element, behind a sticky column (selection, actions, or navigated) when moving horizontally, or behind the sticky header row when moving vertically. The scroll-into-view logic didn't subtract sticky pins per axis, and it resolved the vertical scroll container incorrectly.
Per-axis scroll delta. _scrollElementIntoView was reworked to compute the vertical and horizontal deltas independently via a new computeAxisScrollDelta helper. For a given axis, it subtracts the sticky pins from the relevant container edge and returns the delta needed to reveal the element on that axis. Sticky columns are now subtracted horizontally just as sticky header rows are subtracted vertically.
Sticky columns are collected from the row's selection, actions, and navigated cells (_stickyCells), and horizontal scrolling only applies when the table itself is the scroll container (overflowMode="Scroll").
Correct vertical scroll container. With overflowMode="Scroll" and a constrained height but no scrolling wrapper, the table element itself scrolls vertically — but the old logic walked up from the host and never reached it, so a focused row could stay hidden under the sticky header when navigating up after scrolling down. findVerticalScrollContainer now takes a requireOverflow flag and, starting from the table element, returns the first ancestor that actually overflows vertically (scrollHeight > clientHeight). This distinguishes the table element (whose overflow-y is auto-promoted from overflow-x but only scrolls when height-constrained) from an outer wrapper that owns the scrolling.
Tests cover the horizontal sticky-column cases (LTR, RTL, and a cell wider than the viewport) and the vertical sticky-header case in both setups , where the table itself scrolls, and where an outer wrapper scrolls.
Fixes: #13068