Description
openedon Jun 25, 2020
It seems the .focus
class isn't being set on menu items in Safari on desktop (works fine on mobile). This becomes apparent when you don't want to open submenus on hover, just on click, by commenting out these lines in the CSS:
Now the submenus won't open at all, even when clicking on the parent item.
Found out that Safari doesn't set focus on links, so these events never fire:
Lines 63 to 64 in e78a808
I've spent a couple of hours today trying to come up with a workaround involving an additional click listener. But it's tricky getting it to work without removing the focus/blur event handling in other browsers. Maybe emulating focus isn't a good idea at all? Also tried to use :focus-within
, but this also doesn't work with links in Safari.
I might take another stab at it, so in case I'll find a good solution, I'll open a pull request.