base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[Menu, Select, Dialog] Use internal backdrop for pointer modality

Open atomiks opened this issue 11 months ago • 3 comments

Closes #1119 Also looks to close #1107 demo

  1. pointer-events: none on "outside" elements causes perf issues in Firefox and Safari, degrading increasingly worse as the page size increases.

  2. pointer-events: none with an auto "hole" on the popup isn't feasible due to interop issues with other popups (extensions, other libraries or custom elements) as they will be unusable since they don't know to specify auto.

The main issue with an internal backdrop is z-index layering. With Set up portals in our docs, this issue is essentially gone as the portaled backdrop will always cover the isolated root content.

atomiks avatar Dec 18 '24 08:12 atomiks

Netlify deploy preview

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

Generated by :no_entry_sign: dangerJS against 7f2a3fbf068e068fddb2dadfd826ca4c6f1cdac5

mui-bot avatar Dec 18 '24 08:12 mui-bot

will we still have the *Dialog exported components so people can style their backdrops?

The Backdrop parts are meant to be visual-only for the purposes of dimming the background and such, so Dialog.Backdrop etc still exist

atomiks avatar Dec 18 '24 08:12 atomiks

are meant to be visual-only for the purposes of dimming the background and such, so Dialog.Backdrop etc still exist

Makes total sense, this is what I wanted to confirm 👌

mnajdova avatar Dec 18 '24 10:12 mnajdova