Skip to content

fix(ui5-dynamic-page): prevent scroll jump on TableRowAction focus#13698

Merged
plamenivanov91 merged 8 commits into
mainfrom
dp-redundant-scroll-with-table-fix
Jun 22, 2026
Merged

fix(ui5-dynamic-page): prevent scroll jump on TableRowAction focus#13698
plamenivanov91 merged 8 commits into
mainfrom
dp-redundant-scroll-with-table-fix

Conversation

@plamenivanov91

Copy link
Copy Markdown
Contributor

When an element inside a web component (e.g. the overflow button in ui5-table-row) received focus, onContentFocusIn was scrolling using e.target - the retargeted light DOM host - instead of the actual focused element. For a tall row, this caused an unwanted scroll even when the button itself was fully visible.

Two changes:

  • Use e.composedPath()[0] to get the real focused element (captured synchronously before RAF, where composedPath() returns [])
  • Only call scrollIntoView when the element is actually obscured behind the sticky header or footer, not unconditionally

Fixes #13694

When an element inside a web component (e.g. the overflow button in
ui5-table-row) received focus, onContentFocusIn was scrolling using
e.target - the retargeted light DOM host - instead of the actual focused
element. For a tall row, this caused an unwanted scroll even when the
button itself was fully visible.

Two changes:
- Use e.composedPath()[0] to get the real focused element (captured
  synchronously before RAF, where composedPath() returns [])
- Only call scrollIntoView when the element is actually obscured behind
  the sticky header or footer, not unconditionally

Fixes #13694
@sap-ui5-webcomponents-release

sap-ui5-webcomponents-release Bot commented Jun 15, 2026

Copy link
Copy Markdown

Comment thread packages/fiori/cypress/specs/DynamicPage.cy.tsx Outdated
Comment thread packages/fiori/cypress/specs/DynamicPage.cy.tsx Outdated
…-with-table-fix' into dp-redundant-scroll-with-table-fix
@plamenivanov91 plamenivanov91 merged commit ec9f9f2 into main Jun 22, 2026
19 of 21 checks passed
@plamenivanov91 plamenivanov91 deleted the dp-redundant-scroll-with-table-fix branch June 22, 2026 07:22
@plamenivanov91 plamenivanov91 deployed to netlify-preview June 22, 2026 07:22 — with GitHub Actions Active
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

🧹 Preview deployment cleaned up: https://pr-13698--ui5-webcomponents.netlify.app

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.

[DynamicPage, Table]: scroll jumps after click on table action

2 participants