picturepan2 / spectre

Spectre.css - A Lightweight, Responsive and Modern CSS Framework
https://picturepan2.github.io/spectre/
MIT License
11.33k stars 809 forks source link

Popover not disappear #492

Open zwz opened 6 years ago

zwz commented 6 years ago

I use popover as a popup menu after clicking on my avatar. Each menu item links to a new page, where my avatar is still there, and the popover does not disappear.

devmount commented 5 years ago

The popover should disappear as soon as your cursor leaves it. Can you reproduce the problem in a codepen / jsfiddle or similar?

zwz commented 5 years ago

@devmount Well, I was using it in a SPA. When I click the menu item, the page updates without refresh. The cursor is still over the menu item. I guess that is why the menu is still there. I do not know how to make a SPA and reproduce it on codepen/jsfiddle.

devmount commented 5 years ago

I see. In that case, the only solution I see is to overwrite Spectres popover :hover rules with a class, e.g. .popover-hover:hover and remove that class per Javascript when clicking the button... This isn't an issue with Spectre.css I guess.

zwz commented 5 years ago

@devmount Yes, I think so.