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

Cleanup styling cookie properly to exit preview #2801

Merged
merged 1 commit into from Jun 19, 2019
Merged

Conversation

phy25
Copy link
Collaborator

@phy25 phy25 commented Jun 17, 2019

This is inspired by https://forum.dokuwiki.org/thread/14395 and should fix the problem described there (I did a local test which seems to work).

Previously styling cookie depends on window.opener. Since the popup should be on the same domain as the opener, and the popup's cookie domain is the same as the opener (DokuCookie is used), there is no need to rely on the opener to set the preview cookie. This change will ensure the preview cookie is cleared before the popup is closed, regardless of whether opener exists or not.

Also checks on whether opener exists are added as well.

This is inspired by https://forum.dokuwiki.org/thread/14395 and should fix the problem described there (I did a local test which seems to work).

Previously styling cookie depends on `window.opener`. Since the popup should be on the same domain as the opener, and the popup's cookie domain is the same as the opener (DokuCookie is used), there is no need to rely on the opener to set the preview cookie. This change will ensure the preview cookie is cleared before the popup is closed, regardless of whether opener exists or not.

Also checks on whether opener exists are added as well.
@splitbrain splitbrain merged commit 0a68cd0 into master Jun 19, 2019
@phy25 phy25 deleted the styling-js-opener branch June 26, 2019 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants