-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 displayed in viewport top left corner in Firefox #3294
Comments
Thank you @notramo
for reporting issues. It helps daisyUI a lot 💚
|
I could not reproduce your error, but I could check another issue... mainly because of the space in Peek.2024-12-04.11-27.webmBut I think is not a problem, since it's only a demonstration and when doing a UI, it will be positioned correctly and the behavior works as expected. |
@mhadaniya, what browser was used for the screencast? I tried it on latest Firefox. I noticed that the first few dropdown buttons are working, however, the ones that come after the "no anchor" button in the example are not working. After looking into the code, I found that it's using anchor positioning, which is only supported by most recent versions of Google Chrome at the moment. |
Dropdown in v5 supports the new HTML Popover API and the new CSS Anchor Positioning module (experimental) Here's an example: (Previous dropdown methods such as Popover API + Anchor Positioning are the new way to handle dropdowns and they finally allows us to open/close dropdowns by clicking outside and by clicking the button again (without needing any JS)
As a progressive enhancement, I show the popover in the middle of page for unsupported browsers (because we can't place it next to the button until those browsers support Anchor Positioning) so it works like a fullscreen popover for now. |
It's definitely a better fallback solution for Firefox. Thank you for the quick fix. |
What version of daisyUI are you using?
v5 preview on Tailwind Play
Which browsers are you seeing the problem on?
Firefox
Reproduction URL
https://play.tailwindcss.com/4ztkH9X6wN?file=css
Describe your issue
Any dropdown button shows the dropdown at the top left corner of the viewport.
The text was updated successfully, but these errors were encountered: