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

Preview: Unset popup window upon close #5645

Merged
merged 1 commit into from
Mar 20, 2018
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 15, 2018

Fixes #5634

This pull request seeks to resolve an issue where previewing, closing the preview, and then proceeding to update a post in Firefox will cause the editor to crash. This is because we attempt to set the preview popup window to the updated URL if it is still open after the post is updated:

if ( hasFinishedSaving && this.previewWindow ) {
this.previewWindow.location = link;

This issue primarily impacts Firefox, where the window reference of this.previewWindow still exists even after the popup has been closed. The changes here resolve the issue by ensuring that the value is unset if the popup is closed.

Testing instructions:

Repeat testing instructions from #5634 . Note that the error would only have occurred when, after step 2, you return to the post by closing the popup window. This should work in both Firefox and in your preferred browser.

@aduth aduth added [Type] Bug An existing feature does not function as intended Browser Issues Issues or PRs that are related to browser specific problems labels Mar 15, 2018
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

Solves the problem in firefox and in my smoke testing I did any regression.

@aduth aduth merged commit 8fe597b into master Mar 20, 2018
@aduth aduth deleted the fix/5634-firefox-update branch March 20, 2018 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when previewing before updating post
2 participants