Skip to content

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

Open
plamenivanov91 wants to merge 8 commits into
mainfrom
dp-redundant-scroll-with-table-fix
Open

fix(ui5-dynamic-page): prevent scroll jump on TableRowAction focus#13698
plamenivanov91 wants to merge 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
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