-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix: Wrong z-axis order for fluent-accordion
in @fluentui/webcomponents
#20376
Comments
Thanks for this bug @davidxuang, I've moved this to the Fluent repo where the styles live for tracking. This is an interesting issue and it's probably not as straight forward as this. The select overlaying the accordion, is most likely expected because of how the native select currently works - presenting the listbox on the top layer regardless of what content it overlays. Currently this behavior isn't made available from the web platform and so z-index and stacking context is likely the reason this looks like the bug is that it should overlay the accordion header. However, I think this is a weird stacking context issue and the expected behavior here is currently that this would grow the height of the accordion item - at least based on the current expected POR. We are tracking behavior to use Anchored Region for select to accomplish this here: microsoft/fast#4791. Beyond that we're also working to get this behavior exposed in the platform via Open UI. The proposal can be found here and the most recent issues and discussion can be found here: https://github.com/openui/open-ui/issues?q=is%3Aissue+is%3Aopen+label%3Apopup. For now I think we need to audit to ensure that each components aren't making assumptions about their surroundings in ways that don't make sense. I see some various usage of z-index that looks either outdated or newly added perhaps incidentally as part of an update. We should be able to get a quick fix out to address the expected behavior for this and then audit the rest quickly. |
I did some digging and found the problem in fluent-accordion-item. The actuator for expanding and collapsing each accordion item is a button that is between start, end and the icon elements. It doesn't span the full width but is trying to capture clicks for the entire header. They used a clever trick of adding a The accordion item was built so that z-index isn't actually needed. Button comes before start, end and icon in the DOM and using grid, start is positioned left of the button. It was just the |
🐛 Bug Report
Wrong z-axis order for overlaying controls (e.g.
fluent-select
) insidefluent-accordion
.💻 Repro or Code Sample
🤔 Expected Behavior
ListBox of Select should be over the accordion heading stuffs.
😯 Current Behavior
💁 Possible Solution
Currently, Accordion heading has a
z-index
of2
while that of ListBox of Select is1
, so this may be fixed by just modifying CSS.🔦 Context
Building a form dialog with classified options with Blazor.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: