Closed tnass closed 5 years ago
We're really interested in this. @patw0929 is there any chance we could get this merged?
You're right, that styles should be removed. Thank you! Already merged and will be publish new version after a few other PRs merged.
fantastic, thanks @patw0929 !
I've noticed that the class names on the HTML tag are not getting removed from the DOM once the SmartBanner gets unmounted. This can lead to undesired effects if other styles depend on those class names. In my case I wanted to push another banner (cookie policy) below the SmartBanner, so I've used the
smartbanner-show
class as a sibling class in the css code. As I only display the SmartBanner under certain conditions and not on all pages, there is the possibility for it to get unmounted from the DOM. If that happens without the user interacting with it, the class names need to get removed from DOM manually.I've used
element.classList.remove
with one parameter and repeated it for all the possible class names to not break it in IE11. A unit test has been added, too. For whatever reason I also had to update the snapshot file.