openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Scroll is always visible on Chrome

Open DenisDuev opened this issue 2 years ago • 5 comments

OpenUI5 version: 1.104 (but also in older versions)

Browser/version (+device/version): Chrome v104.0

Any other tested browsers/devices(OK/FAIL): Firefox - works ok - the scroll is hidden if inactive

URL (minimal example if possible): https://openui5.hana.ondemand.com/

Steps to reproduce the problem:

  1. Go the URL
  2. See the scrollbar
  • on Chrome - always visible
  • on Firefox - using the default scroll - it appears only when scrolling

What is the expected result? On Chrome to use the default scroll - not to override it with custom styles that breaks the default behaviour

What happens instead? scroll is always visible - if you have multiple containers it is very ugly

Any other information? (attach screenshot if possible)

If I manually disable these styles in the browser - the scroll fallback to default (wanted behaviour)

Scroll on Chrome: chrome-scroll

Scroll on Firefox: firefox-scroll

DenisDuev avatar Aug 10 '22 08:08 DenisDuev

Hello @DenisDuev as this is some native browser behaviour I am closing the issue

kskondov avatar Aug 10 '22 13:08 kskondov

UI5 styles break the default browser behaviour

DenisDuev avatar Aug 10 '22 13:08 DenisDuev

clear-styles

DenisDuev avatar Aug 10 '22 14:08 DenisDuev

UI5 styles break the default browser behaviour

@DenisDuev, hiding the scroll bar when not scrolled is an experimental behaviour, available under the flag chrome://flags/#overlay-scrollbars. Without this flag Chrome shows a scrollbar permanently.

But of course, it is great if UI5 would support such behaviour in Chrome.

pubmikeb avatar Aug 19 '22 10:08 pubmikeb

Hello,

We asked for design feedback and will be back to you.

Just keep in mind what you describe as issue is default behavior. Example scroll container: https://sdk.openui5.org/entity/sap.m.ScrollContainer/sample/sap.m.sample.ScrollContainer . Scrollbar appearance is defined not by the Demo Kit but by the underlying controls from the standard UI5 library.

However, there is a setting that can be used to instruct the controls to delegate scroll styling to the browser which can help in this case.

Best regards, Jordan

jdichev avatar Oct 13 '22 06:10 jdichev

Hi @jdichev,

What is this setting that you've mentioned in your comment?

However, there is a setting that can be used to instruct the controls to delegate scroll styling to the browser which can help in this case.

DenisDuev avatar Nov 01 '22 08:11 DenisDuev

Hello @DenisDuev,

The setting I meant is a class "sapUiNativeScrollbars" that can be applied to root html element and would tell all controls that would respected that to avoid styling scrollbars. This is not something documented but can be found in the code therefore should be used with caution.

Best regards, Jordan

jdichev avatar Nov 01 '22 21:11 jdichev