daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

bug: accordions and collapses don't open in safari 15.1

Open DustinJSilk opened this issue 2 years ago โ€ข 1 comments

What version of daisyUI are you using?

v3 + v4

Which browsers are you seeing the problem on?

Safari

Reproduction URL

https://daisyui.com/components/accordion/

Describe your issue

In safari Version 15.1 (17612.2.9.1.20), accordions and collapses that use checkboxes or radio buttons don't open at all. This is reproducible on the daisyui website from v3 and up.

I'm not sure why they don't open, but maybe we can find a fallback?

EDIT

Looks like if I add height: fit-content to the checked selector, it seems to work. We don't get a nice transition on safari but thats ok, on chrome it still works smoothly

.collapse[open]>.collapse-content,
.collapse-open>.collapse-content,
.collapse:focus:not(.collapse-close)>.collapse-content,
.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,
.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content

DustinJSilk avatar Nov 22 '23 09:11 DustinJSilk

I'm having this problem as well. Thanks for the workaround!

maemigh avatar Dec 09 '23 13:12 maemigh