tomusborne / generatepress

448 stars 88 forks source link

Two sub-menus on top of each other #144

Open leohsiang opened 3 years ago

leohsiang commented 3 years ago

Reference: https://generatepress.com/forums/topic/two-sub-menues-on-top-of-each-other/#post-1664001

tomusborne commented 3 years ago

I believe this happens when you focus on a menu item with a sub-menu. Right now, sfHover class gets added to parent items when they become focused. This shows the sub-menu (which is what makes the navigation accessible using the tab key).

So, if you focus a menu item and then go and hover on another parent item, both sub-menus will be shown.

Not sure there's a way around this without rethinking how we show sub-menus on focus. This issue does come up quite a bit under different circumstances.