MrFrankel / ngx-popper

An angular wrapper for popper.js, great for tooltips and positioning popping elements
https://mrfrankel.github.io/ngx-popper/
MIT License
186 stars 37 forks source link

Variable 'state' is true by default even if the popover isn't open #150

Open john8329 opened 3 years ago

john8329 commented 3 years ago

I'm using the state variable to check if the popover is open in order to lazy load its contents (which has a bad name IMO, 'visible' would be better). Apparently the popover always starts with state = true, even if the popover isn't visible. Is it by design? What does it mean?

I expect the popover to be hidden (unless otherwise specified) and the variable to be false.

If I toggle the state two times (opening and closing the popover) the variable becomes false which is correct.

As a workaround I'm using the attribute ariaHidden meanwhile.

Thanks