Skip to content

fix(ui5-dynamic-page): correct scroll-padding-top for focus auto-scroll#13418

Merged
plamenivanov91 merged 5 commits into
mainfrom
dp-fix
May 14, 2026
Merged

fix(ui5-dynamic-page): correct scroll-padding-top for focus auto-scroll#13418
plamenivanov91 merged 5 commits into
mainfrom
dp-fix

Conversation

@plamenivanov91
Copy link
Copy Markdown
Contributor

@plamenivanov91 plamenivanov91 commented Apr 20, 2026

Replace the pointer-down focus-skip workaround with a scroll-padding-top calculation based on the actually overlapped sticky area (title/header and current scrollTop), so visible content no longer shifts on click while partially clipped controls can still scroll into view on keyboard focus.

Keep smooth scroll behavior when auto-scroll is needed.

Add/update DynamicPage Cypress coverage for:

no scroll shift on content button click with partially hidden header
no scroll shift on tab focus when target is already visible
partially clipped textarea is scrolled into view on Tab focus

Fixes: #13332

Keep pointer interactions stable by skipping focus-driven auto-scroll
after pointer down in the content area.

For keyboard navigation, scroll only when the focused element is
actually clipped by the effective visible content viewport.

Keep smooth scrolling when auto-scroll is needed.

Add and update DynamicPage Cypress coverage for:
- no scroll shift on content button click with partially hidden header
- no scroll shift on tab focus when target is already visible

Fixes: #13332
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Apr 20, 2026

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

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 20, 2026 12:30 Inactive
@plamenivanov91 plamenivanov91 marked this pull request as ready for review April 23, 2026 09:01
Comment thread packages/fiori/src/DynamicPage.ts Outdated
@plamenivanov91 plamenivanov91 changed the title fix(ui5-dynamic-page): prevent unwanted content scroll on focus fix(ui5-dynamic-page): correct scroll-padding-top for focus auto-scroll Apr 24, 2026
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 24, 2026 11:15 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview May 8, 2026 12:47 Inactive
@plamenivanov91 plamenivanov91 merged commit ccf4bcc into main May 14, 2026
20 of 21 checks passed
@plamenivanov91 plamenivanov91 deleted the dp-fix branch May 14, 2026 13:00
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview May 14, 2026 13:00 Inactive
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version v2.22.0-rc.6 🎉

The release is available on v2.22.0-rc.6

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DynamicPage: clicking button in table header/toolbar doesn't work, but scrolls page header panel

3 participants