Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accepting cookie consent does not dismiss modal dialog #3216

Closed
squidfunk opened this issue Nov 12, 2021 Discussed in #3215 · 5 comments
Closed

Accepting cookie consent does not dismiss modal dialog #3216

squidfunk opened this issue Nov 12, 2021 Discussed in #3215 · 5 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@squidfunk
Copy link
Owner

Discussed in #3215

Originally posted by jhendricks123 November 12, 2021
I'm using the anchor tag #__consent to enable the user to launch the cookie consent dialog on demand, and when you manually launch the dialog this way, the Accept button does not dismiss the dialog. It basically reloads the page with /#__consent still in the URL. So you have to manually remove the anchor tag from the URL to get it to go away.

Right now I have the link as a button in the footer. I put the link there using the copyright property in mkdocs.yml. Not the most obvious place for it but it was a quick and easy way to give the user access to it on any page. The behavior is the same though whether I do it this way, or put [Change cookie settings](#__consent) in the body of a page.

You can see the behavior on milestonepstools.com. Scroll down to the bottom of the page and click the "Change cookie settings" button.

@squidfunk squidfunk added the bug Issue reports a bug label Nov 12, 2021
@jamesrwelch
Copy link
Sponsor

I've had this problem - I have an override which does

window.location.hash = '';

before reloading the window in the javascript function. I'm not sure how 'good' a solution this is - it seems to work for me - but I can submit it as a pull request if you think it's an adequate solution.

@squidfunk
Copy link
Owner Author

Jup, that should work. A PR is appreciated 😊

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Nov 16, 2021
@squidfunk
Copy link
Owner Author

squidfunk commented Nov 16, 2021

Thanks to @jamesrwelch, this has just been fixed in the latest commit on Insiders 😊

@joshooaj
Copy link
Sponsor Contributor

Thanks @jamesrwelch and @squidfunk - I happened to update the site today and noticed the change. Much appreciated!

@squidfunk
Copy link
Owner Author

The fix was just released as part of 7.3.6-insiders-3.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants