cookieconsent: Problem scrollbar in Chrome
I noticed that in chrome it happens that when loading the page, sometimes the vertical scrollbar does not appear. If I delete the cookie plugin from code, the scrollbar is always displayed. Don’t know where the problem might be?
I think it’s probably caused by the div#cc--main sticking to the bottom of the page.
Thank You
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
A much simpler solution would be to just use css. Don’t know why I didn’t think of this:
This should achieve the same end result as the JavaScript code. Short, simple & light.
It works, thank you very much!
Adding
display: nonewill also remove the fade-in/fade-out transitions so this is not a viable solution for me.You will have to either modify yourself the source javascript file or use the below suggested solution.
Place the
fixScrollbarfunction before (or after)cc.run(...)and then call it inside theonAcceptmethod. This code will detect if modals are visible; if they aren’t => adddisplay: noneto the element withid="cc--main";Since I can’t see the issue in your website (using chrome) and I don’t know how to reproduce it, it’s tricky to determine exactly what is causing this. Leaving this open until a viable solution is proposed.