Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: observe internal layout to avoid problems with fixed height #8268

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Dec 3, 2024

Description

Fixes vaadin/flow#20598 (which is a regression from #7988)

This is a fix for the case when vaadin-form-layout height is inherited from a fixed-size parent element (which is what happens in Flow due to the fact that it sets height: 100vh on the <body> and outlet element).

Currently, when scrolling long enough, the layout is becoming "not intersecting" and opacity is wrongly set to 0. This change ensures that IntersectionObserver instead uses the internal element since its height is defined by content.

Type of change

  • Bugfix

Copy link

sonarqubecloud bot commented Dec 3, 2024

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remember why we change the opacity in the first place? The comment mentions something about "avoid jumps", but opacity doesn't affect the size of the element.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jump can happen e.g. in case from vaadin/flow-components#6728 (comment) when form layout becomes visible:

form-layout-jump.mp4

@web-padawan web-padawan merged commit 6999a73 into main Dec 5, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/form-layout-observer branch December 5, 2024 11:17
web-padawan added a commit that referenced this pull request Dec 5, 2024
…) (#8280)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Dec 5, 2024
…) (#8279)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.

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

Successfully merging this pull request may close these issues.

Upgrade to Vaadin 24.4.15+ causes scrollable pages to become blank when scrolling
4 participants