Mastermindzh / react-cookie-consent

A small, simple and customizable cookie consent bar for use in React applications.
https://mastermindzh.github.io/react-cookie-consent/
MIT License
609 stars 84 forks source link

The "I don't care about cookies" extension breaks sites that use overlay #108

Closed zachsa closed 3 years ago

zachsa commented 3 years ago

I was notified that users with the "I don't care about cookies" extension can't use the site if I have overlay = true, because there is no way of dismissing the overlay.

The easiest way of fixing this is to not include the overlay, but that seems like a pity.

Mastermindzh commented 3 years ago

How much do you know about the plugin? Would adding an "x" to close the overlay fix it?

It's more a request for the extension but if a simple "x" solves it I'm all for it.

zachsa commented 3 years ago

I don't know much about the plugin. Someone I worked with was complaining that my site was broken, and I saw that there was an overlay that was not removeable.

I think a simple X would do the trick!

It's annoying, because the plugin clearly should not remove HTML elements. But because it does, it looked like my site was broken.

Mastermindzh commented 3 years ago

I can add in the X and see what that does. Won't hurt anyway :)

JulienLemaitre commented 3 years ago

Hi,

As I can see on the website I'm configuring this module on, the extension "I don't care about cookies" just inject css that target a huge amount of css class and ids.

So adding a prop overlayClasses="cookie_consent_overlay" on the CookieConsent component allow the extension to hide the overlay as well as the popin.

Mastermindzh commented 3 years ago

Thanks @JulienLemaitre , that will be the official workaround for now.

Enjoy!