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

[List] Sticky subheader overlaps scrollbar on iOS (all major browsers) #44569

Open
functoria opened this issue Nov 27, 2024 · 3 comments
Open
Assignees
Labels
component: list This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@functoria
Copy link

functoria commented Nov 27, 2024

Steps to reproduce

Steps:
On any iOS 18.0.1+ browser

  1. Open this link to live example: (official List demo page)
    2.Scroll the sticky sub-header list
    3.Notice the list sub-headers overlapping the scrollbar

Screenshot 2024-11-27 at 09 45 11

Current behavior

List sub-headers are overlapping the list scrollbar (overlay)

Expected behavior

List scrollbar stays "above" list content

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: ListSubheader iOS scrollbar

@functoria functoria added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 27, 2024
@functoria functoria changed the title ListSubheader with zIndex > 0 overlaps scrollbar on iOS (all major browsers) Sticky ListSubheader overlaps scrollbar on iOS (all major browsers) Nov 27, 2024
@aarongarciah aarongarciah added package: material-ui Specific to @mui/material component: list This is the name of the generic UI component, not the React module! labels Nov 27, 2024
@aarongarciah aarongarciah self-assigned this Nov 27, 2024
@aarongarciah aarongarciah changed the title Sticky ListSubheader overlaps scrollbar on iOS (all major browsers) [material-ui][List] Sticky ListSubheader overlaps scrollbar on iOS (all major browsers) Nov 27, 2024
@aarongarciah aarongarciah changed the title [material-ui][List] Sticky ListSubheader overlaps scrollbar on iOS (all major browsers) [List] Sticky subheader overlaps scrollbar on iOS (all major browsers) Nov 27, 2024
@siriwatknp siriwatknp added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 28, 2024
@aarongarciah
Copy link
Member

This is a tricky one. Not sure we can land a proper solution. We'll investigate a bit. When the sticky subheaders have the same background color as the list, it's easy to subtract some pixels to avoid it covering te scrollbar. But doing that when the subheader has another background color makes it look really bad.

@functoria
Copy link
Author

functoria commented Nov 28, 2024

Hi, Thanks for the response!

Fortunately in my case, I've worked around it by adding some right padding to the List. I'm not sure why iOS scrollbars don't play well with sticky items, it looks fine on Android.

@aarongarciah
Copy link
Member

@functoria your solution works well when subheaders have the same background as the list scrolling container, but it'd be problematic if subheaders have a different background, a bottom border, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: list This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants