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

CookieConsent: Treat denied localStorage as "declined" cookie banner. #412

Merged
merged 2 commits into from
Jul 5, 2021

Conversation

apepper
Copy link
Contributor

@apepper apepper commented Jul 5, 2021

Google Chrome seems to treat direct access to "localStorage" in an iframe in incognito as a "third party cookie" and blocks it (see [1]).

Otherwise one might see this error in the console:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

[1] elastic/kibana#87901 (comment)

Google Chrome seems to treat direct access to "localStorage" in an iframe in incognito as a "third party cookie" and blocks it (see [1]).

[1] elastic/kibana#87901 (comment)
@apepper apepper requested a review from dcsaszar July 5, 2021 12:26
@dcsaszar dcsaszar self-assigned this Jul 5, 2021
Copy link
Contributor

@dcsaszar dcsaszar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely.
However, the underlying issue means that for an editor, the site setting Cookie consent link has no visible effect. It would be nice to be able to test it as an editor.

  • How about we add at least a hint in the editor description?

@apepper
Copy link
Contributor Author

apepper commented Jul 5, 2021

REVIEW (b4c17cf)

Copy link
Contributor

@dcsaszar dcsaszar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dcsaszar dcsaszar merged commit eff89bc into master Jul 5, 2021
@dcsaszar dcsaszar deleted the fix_localStorage_in_incognito branch July 5, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants