Tropix126 / fluent-svelte

A faithful implementation of Microsoft's Fluent Design System in Svelte.
https://fluent-svelte.vercel.app
MIT License
609 stars 27 forks source link

Switch to a CSS-based method of hiding MenuFlyouts. #12

Closed Tropix126 closed 2 years ago

Tropix126 commented 2 years ago

Currently, we are actually removing the anchor from the DOM, however this causes issues with the checkbox and radio items being reset on every open. I'm not sure if this is should be considered as intended, but it's certainly not expected behavior. Anyways, I plan to use display: none; instead of if-blocks to preserve input state across opens.

JLAcostaEC commented 2 years ago

I don't know if my comment is helpful, but applying a display: none would make the element untransitionable, you should use a set of opacity and pointerEvents or use transform: scale(0) + PointerEvents: none. Greetings

Tropix126 commented 2 years ago

Think i'm going to close this as intended. If anyone has further thoughts on this, feel free to open another issue.