Skip to content

Fix modal backdrop overlap in sticky container #38564

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PakinamElBanna
Copy link

@PakinamElBanna PakinamElBanna commented May 7, 2023

Description

There was a reported issue here that the modal backdrop overlaps the modal when it's used in a sticky container.

Motivation & Context

The issue mentioned renders the modal completely non-interactive once launched; The user cannot interact or even dismiss the modal

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #38561

@PakinamElBanna PakinamElBanna requested a review from a team as a code owner May 7, 2023 15:27
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing a PR @PakinamElBanna but all the values end by 5 or 0 with a certain logic. 1019 doesn't fit in this logic. Moreover, the $zindex-* vars are ordered by ascending values.

There's no detailed explanation of the impact of this modification on the existing code. The order that was chosen before is difficult to change without regressions, please try to explain the new order in detail; a lot of combinations are possible.

@PakinamElBanna
Copy link
Author

PakinamElBanna commented May 12, 2023

@julien-deramond makes sense, I just noticed the chronological order of the z-indexes variables. Thing is, I guess this leaves us with the situation that we either give it a 1010 (but accepting the fact that sticky elements will sit on top of the backdrop - which wouldn't make much sense I think - or maybe let go of this element and give the modal a low opacity background. Would you go for something as drastic as this though? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modals do not work within sticky-top or fixed-top DIVs
2 participants