Skip to content

fix(ui5-dynamic-page): ignore zero-box focus sentinels in scroll handler - #13965

Open
NakataCode wants to merge 2 commits into
mainfrom
dynamic-page-scroll-sentinel
Open

fix(ui5-dynamic-page): ignore zero-box focus sentinels in scroll handler#13965
NakataCode wants to merge 2 commits into
mainfrom
dynamic-page-scroll-sentinel

Conversation

@NakataCode

Copy link
Copy Markdown
Contributor

Problem

On Shift+Tab from a growing button, the Table's roving-tabindex moves focus through a transient zero-height sentinel element before landing on the real row.

DynamicPage.onContentFocusIn captured that sentinel and called scrollIntoView on it, scrolling the container down and hiding the focused row.

Solution

Guard the handler to bail early when the focus target has no layout box on either axis:

if (target.offsetWidth === 0 || target.offsetHeight === 0) return;

Real focusables always have a non-zero box on both axes; sentinels do not.

Fixes: #13935

@NakataCode
NakataCode deployed to netlify-preview August 21, 2026 09:46 — with GitHub Actions Active
@NakataCode
NakataCode deployed to netlify-preview August 21, 2026 09:51 — with GitHub Actions Active
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

@dobrinyonkov
dobrinyonkov self-requested a review August 21, 2026 10:25
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.

[Dynamic Page]: Focus issue

1 participant