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

[POC] Anchored modality changes #1231

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

atomiks
Copy link
Contributor

@atomiks atomiks commented Dec 26, 2024

This changes the modality of anchored popups that primarily open on click, and adds the modal prop to Popover.

  • Scroll locking is only enabled if the Backdrop part is rendered (where obscuring content justifies the lock)
  • The internal backdrop becomes inert (no longer blocks pointer-events) if the anchor is hidden from view (possible alternative: if the popup is hidden, but Floating UI doesn't provide a hook for this out of the box). This allows the user to instantly click any item beneath once they've scrolled away from the popover and no longer 'care' about it being open. Outside clicks are presumed to be careful and intentional at this point

@atomiks atomiks added component: select This is the name of the generic UI component, not the React module! component: menu This is the name of the generic UI component, not the React module! component: popover The React component. labels Dec 26, 2024
@mui-bot
Copy link

mui-bot commented Dec 26, 2024

Netlify deploy preview

https://deploy-preview-1231--base-ui.netlify.app/

Generated by 🚫 dangerJS against 91f4a63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module! component: popover The React component. component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants