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

[combo-box] Scroll bar is not visible on iOS #2841

Open
1 task done
knoobie opened this issue Oct 13, 2021 · 13 comments
Open
1 task done

[combo-box] Scroll bar is not visible on iOS #2841

knoobie opened this issue Oct 13, 2021 · 13 comments
Labels
bug Something isn't working Impact: Low needs research More information needed to estimate Severity: Minor vaadin-combo-box

Comments

@knoobie
Copy link
Contributor

knoobie commented Oct 13, 2021

Description

There is no scroll bar for lazy loading / big data sets in a combo box on iOS. This works on desktop (e.g. firefox / ubuntu) but is not visible on iOS 15 safari

Expected outcome

There is a scrollbar; even on iOS.

Minimal reproducible example

Steps to reproduce

  1. Open one of the example on iOS
  2. Open the combo box and expect a scrollbar because of the amount of items

66E3EF67-6C6E-4174-A799-94EEA36233BF

Environment

  • V14, V21, V22
  • iOS 15

Browsers Affected

  • iOS Safari
@knoobie knoobie changed the title [combo box] Scroll bar is not visible on iOS [combo-box] Scroll bar is not visible on iOS Oct 13, 2021
@web-padawan web-padawan added bug Something isn't working Impact: Low Severity: Major vaadin-combo-box needs research More information needed to estimate labels Oct 13, 2021
@web-padawan
Copy link
Member

Thanks for the issue. The are some old workarounds related to scrollbar appearance in Safari:

/* Fixes item background from getting on top of scrollbars on Safari */
transform: translate3d(0, 0, 0);

/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
box-shadow: 0 0 0 white;

The same code is present in V14 also but in a different file - see it here.

@tomivirkki tomivirkki added the a11y Accessibility issue label Oct 13, 2021
@tomivirkki tomivirkki assigned tomivirkki and unassigned tomivirkki Oct 13, 2021
@vursen
Copy link
Contributor

vursen commented Oct 13, 2021

I'm not sure if the initially invisible scrollbar on iOS is actually an issue. That's how scrollbars work in Mobile Safari by default. Look at the scrollbar in the video recorded on iOS 15, the scrollbar appears only after you start scrolling:

Screen.Recording.2021-10-13.at.15.03.36.mov

@knoobie
Copy link
Contributor Author

knoobie commented Oct 13, 2021

Hmm.. weird.. here is a video of my phone

iPhone 12 Pro; iOS 15.0.1

IMG_7140.MP4

@vursen
Copy link
Contributor

vursen commented Oct 13, 2021

I checked it on my iPhone XR iOS 15.0.1, the scrollbar works fine. I wonder if the issue is somehow related to the fact of using iPhone 12 with iOS 15.0.1 on board.

@knoobie
Copy link
Contributor Author

knoobie commented Oct 13, 2021

I really have no clue.. I just tested it with my work phone (iPhone 8 with iOS 14.7.1) and there is it missing as well. Going to re-test it, once the iOS 14.8 update is applied.

Edit: Same behavior (no scroll bar) on iPhone 8 with iOS 14.8

@jouni
Copy link
Member

jouni commented Oct 13, 2021

No scrollbar for me either. iPhone 8, iOS 14.8.

The iOS scrollbars are brittle on overflow: auto elements, according to my experience. I recall us having this same issue in Grid in the early days.

@knoobie
Copy link
Contributor Author

knoobie commented Oct 14, 2021

Because of Jouni's comment.. I tested the V14 Grid (https://vaadin.com/components/vaadin-grid/html-examples) with firefox on ubuntu I have a scroll bar; with my iPhone I don't have a scroll bar there.. looks like the problem is not limited to the combo box. :(

@vursen
Copy link
Contributor

vursen commented Oct 14, 2021

I'm trying to figure out whether the issue is caused by the latest a11y refactoring. Is the combo-box's scrollbar invisible even in Vaadin 21?

https://a11y-vaadin-playground.netlify.app/pages/v21/combo-box.html

cc @knoobie @jouni

@knoobie
Copy link
Contributor Author

knoobie commented Oct 14, 2021

I don't think it's related to the a11y changes because it is already present in V14 - retested the V21 page and have no scroll bar on both phones (iPhone 12 Pro and iPhone 8) both running the latest 15.0.2.

@web-padawan
Copy link
Member

As I mentioned above we use the same CSS rules for both V14 and V22 - these are just placed in different files.
So it does make sense to assume the fix should be the same regardless of DOM structure changes in V22.

@web-padawan web-padawan removed the a11y Accessibility issue label Oct 14, 2021
@knoobie
Copy link
Contributor Author

knoobie commented Oct 14, 2021

Added a video from V14 docs

IMG_7146.MP4

I noticed something funny.. could it be possible that there is a scrollbar but we can't see it cause of coloring?

See e.g.
7AAF9D68-2A8D-4A48-A73F-BED0AD66B24E

You see the scrollbar in the first screen shot.. but scrolling back to the top.. it looks like the scrollbar is vanishing behind the content

C83AB255-A01E-4E17-9758-3D943CB7792F

@jouni
Copy link
Member

jouni commented Oct 14, 2021

I think iOS and macOS have some heuristic for determining whether to use white or black for the scrollbar (with opacity). On the a11y test page, I would assume it would be black, as the page background is white.

@web-padawan
Copy link
Member

See also #1930 (that issue is quite old so I closed it as a duplicate of this one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Impact: Low needs research More information needed to estimate Severity: Minor vaadin-combo-box
Projects
None yet
Development

No branches or pull requests

6 participants