SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
449 stars 101 forks source link

ObjectPage: Content adds too large empty section when headerArea autocollapse (when scrolled) #6648

Open aleksaToljic opened 4 days ago

aleksaToljic commented 4 days ago

Describe the bug

When the user starts scrolling, headerArea collapses, and a large section is added above the content

Isolated Example

https://stackblitz.com/edit/github-sr4l8x?file=src%2FApp.tsx

Reproduction steps

  1. Start scrolling slowly

Expected Behaviour

Content to not jumb down

Screenshots or Videos

image

UI5 Web Components for React Version

2.4.0

UI5 Web Components Version

2.4.0

Browser

Chrome

Operating System

macOs Sequoia 15.1

Additional Context

No response

Relevant log output

No response

Organization

TronIT

Declaration

aleksaToljic commented 4 days ago

I have a fix for this, it's pretty straightforward. The problem is that we add position: absolute to headerArea, when it's collapsed, and it looses it's width, so it looks like this (when I remove visibility: hidden) Screenshot 2024-11-22 at 14 54 34

Solution for this would be to add left: 0, right: 0 or width:

Screenshot 2024-11-22 at 14 56 03

I can create PR if needed.