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

Checkboxes show above sticky content #43657

Closed
angrybacon opened this issue Sep 8, 2024 · 2 comments
Closed

Checkboxes show above sticky content #43657

angrybacon opened this issue Sep 8, 2024 · 2 comments
Assignees
Labels
component: checkbox This is the name of the generic UI component, not the React module! customization: css Design CSS customizability

Comments

@angrybacon
Copy link

angrybacon commented Sep 8, 2024

Steps to reproduce

https://stackblitz.com/edit/react-2qkkqu

  1. Reduce viewport width to enable vertical scrolling
  2. Scroll towards the bottom and notice the checkboxes remain visible above the sticky content

Current behavior

Screen.Recording.2024-09-08.at.12.41.50.mov

Expected behavior

I expect the sticky content to appear above any scrolling content by default, without having to resort to hard-to-maintain z-index fixes.

Context

I'm trying to make the top of my Paper available at all times for the user, including after scrolling to see the bottom of the Paper.

Checkbox inputs use position: relative which makes them appear on top. I'm not familiar enough with position: sticky to assume that this is the expected or unexpected behavior (or that position: relative is required for MUI's checkboxes implementation)

Your environment

No response

Search keywords: checkbox sticky relative

@angrybacon angrybacon added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 8, 2024
@zannager zannager added the component: checkbox This is the name of the generic UI component, not the React module! label Sep 9, 2024
@siriwatknp
Copy link
Member

In this case, you definitely need to apply zIndex: 1 (at least). The position relative is require for the input (absolute).

@siriwatknp siriwatknp added customization: css Design CSS customizability and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 10, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @angrybacon! How was your experience with our support team?
If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: checkbox This is the name of the generic UI component, not the React module! customization: css Design CSS customizability
Projects
None yet
Development

No branches or pull requests

4 participants