Skip to content

fix(ui5-table-growing): add rootMargin to observer#11242

Merged
DonkeyCo merged 5 commits intomainfrom
fix-growing-scroll
Apr 9, 2025
Merged

fix(ui5-table-growing): add rootMargin to observer#11242
DonkeyCo merged 5 commits intomainfrom
fix-growing-scroll

Conversation

@DonkeyCo
Copy link
Contributor

@DonkeyCo DonkeyCo commented Apr 2, 2025

There is an issue with subpixel rendering introducing rounding errors. The growing sample in the playground is not working with zoom lower than 100%.

If the table is inside a scroll container, which is inside of an IFrame taken a fraction of the available width, rounding errors lead to the IntersectionObserver not calling the callback, as it does not detect the end-row scrolling into viewport.

Added a rootMargin of 5px to try to circumvent the rounding issue by increasing the intersection area. Additionally, the root should be the scrollContainer instead of the document.

Fixes #11071

@DonkeyCo DonkeyCo requested a review from aborjinik April 7, 2025 08:36
@DonkeyCo DonkeyCo merged commit da527cb into main Apr 9, 2025
12 checks passed
@DonkeyCo DonkeyCo deleted the fix-growing-scroll branch April 9, 2025 08:35
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.9.1-rc.0 🎉

The release is available on v2.9.1-rc.0

Your semantic-release bot 📦🚀

NakataCode added a commit that referenced this pull request May 15, 2025
Problem:
The list's onLoadMore event is not triggered in Firefox at certain zoom levels when a sticky header is present. This is due to how Firefox calculates intersections with sticky positioned elements, causing subpixel rendering issues.

Solution:
Use the proper scroll container as the root for the IntersectionObserver and add a rootMargin of 5px.

Similar to: #11242
Fixes: #11461
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.

[SF][Growing Table]: [Table cannot scroll down when the screen size is set to 90%]

3 participants