SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.97k stars 1.24k forks source link

DynamicPageHeader expanded automatically on scroll on mobile devices #4129

Open Kalo2412 opened 2 months ago

Kalo2412 commented 2 months ago

OpenUI5 version: 1.117.0

Browser/version (+device/version): 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1'

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): https://sapui5.hana.ondemand.com/#/entity/sap.f.DynamicPage/sample/sap.f.sample.DynamicPageWithStickySubheader/code

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Set the DynamicPage attribute "headerExpanded" to false

What is the expected result? The header should not be expanded automatically on scroll

What happens instead? The header is internally expanded automatically on scroll

Any other information? (attach screenshot if possible)

https://teamschedule-my.sharepoint.com/:v:/g/personal/mihael_kirov_teamschedule_digital/Eac25tkkwzpPlanvi3NGuoABZGiRSpzccp9959XwNyzDxw?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=aprmvL

MapTo0 commented 2 months ago

Hello @Kalo2412

headerExpanded sets the initial state of the header preserveHeaderStateOnScroll defines if the state should be preserved while the user is scrolling.

I guess you need a combination of these two properties.

Best Regards! Martin UI5 Development Support

Kalo2412 commented 2 months ago

@MapTo0 Thank you very much for the answer, unfortunately in landscape mode this property does not make any difference even if set to true (preserveHeaderStateOnScroll). Can you check it? We need this to be always true.

Kalo2412 commented 2 months ago

@MapTo0 ?

MapTo0 commented 2 months ago

Hey @Kalo2412

I could not reproduce the issue on my side. Could you please recheck this bin and provide steps to reproduce and expected behaviour? https://jsbin.com/dufakuhofi/4/edit?html,console

Best Regards, Martin

Kalo2412 commented 2 months ago

Here is a video that shows the issue: (It is reproduced on landscape mode)

https://teamschedule-my.sharepoint.com/:v:/g/personal/mihael_kirov_teamschedule_digital/EbCwcm-5AM5Lv-JPpUa7PQ8BAlfx8BW26w5R7_xHXzrhXQ?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=87FUlY

MapTo0 commented 2 months ago

Hello @Kalo2412 , Thank you for sharing this finding. I've created an internal incident DINC0281679. The status of the issue will be updated here in GitHub.

Regards, Martin

jdichev commented 3 weeks ago

Hello @Kalo2412,

What you describe is the expected behavior. It is documented in the property's documentation that it only serves to initiate the control in a certain state but user interaction can affect the state.

If you seek the header to never expand once initialized in collapsed state you could use the preserveHeaderStateOnScroll property.

Best regards, Jordan

Kalo2412 commented 3 weeks ago

@jdichev As I mentioned preserveHeaderStateOnScroll is not taken into account even if set to true it is still opened on scroll please see the video