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

Fix popup not opening on iPad #1301

Merged
merged 3 commits into from
May 22, 2024
Merged

Fix popup not opening on iPad #1301

merged 3 commits into from
May 22, 2024

Conversation

arjun-dureja
Copy link
Contributor

@arjun-dureja arjun-dureja commented May 22, 2024

Summary

  • There's an issue on iPads where the object returned from window.open stays defined even after the window/tab is closed. This causes the popup to not be opened when one was opened in the past due to this line of code:

    waitForPopupLoaded = async (): Promise<Window> => {
    if (this.popup) return this.popup;

  • To solve this, I added a check for popup.closed on the same line, so that the popup is opened again when it's closed

How did you test your changes?

  • Manually and unit tests
  • Also verified that it's still working as expected on other devices
Before After
Screen.Recording.2024-05-22.at.2.12.03.PM.mov
Screen.Recording.2024-05-22.at.2.12.40.PM.mov

@arjun-dureja arjun-dureja marked this pull request as ready for review May 22, 2024 19:23
Copy link
Contributor

@bangtoven bangtoven left a comment

Choose a reason for hiding this comment

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

🔥

@bangtoven bangtoven merged commit 7a99455 into master May 22, 2024
9 checks passed
@bangtoven bangtoven deleted the arjun/fixIPadPopup branch May 22, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants