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

bug: V5 Dropdown mispositioning using popover API and anchorpositioning #3322

Closed
J4gQBqqR opened this issue Dec 16, 2024 · 2 comments
Closed
Labels

Comments

@J4gQBqqR
Copy link

What version of daisyUI are you using?

5-alpha49

Which browsers are you seeing the problem on?

Firefox

Reproduction URL

https://v5.daisyui.com/components/dropdown/

Describe your issue

image

It happens on both normal Firefox and Firefox nightly

Copy link

Thank you @J4gQBqqR for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

@saadeghi
Copy link
Owner

Anchor positioning is the standard solution for dropdowns, but it's very new.
Firefox doesn't support it yet: https://caniuse.com/css-anchor-positioning
So as and incremental adaptation, we show the dropdown in the middle of screen. It works, it doesn't break the functionality, but it shows in the middle of screen like a modal.

There's a polyfill that makes it work until Firefox adds the support:
https://github.com/oddbird/css-anchor-positioning

Alternatively you can still use the other methods such as

@saadeghi saadeghi added the v5 label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants