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: close popup when tab navigates during connect #807

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Jan 6, 2025

Context

Closes #655

Changes proposed in this pull request

  • Send a message CLOSE_POPUP to close the popup, triggered by connect_wallet.close_popup event.
    • Closes popup when tab opens/navigates due to key addition or consent approval.
  • Remove queue from SendToPopup, as not needed and causes issues with above message.
    • queue was added when we weren't syncing tab state live into popup (we sync now with SET_TAB_DATA).
  • The issue wasn't only with Firefox. When current reused tab has a navigation (like from app/index.html to wallet key-add page or to consent page), the popup didn't auto-close in Chrome either.
  • E2E tests break due to us extensively relying on popup being open, so make window.close() a no-op in popup.

@github-actions github-actions bot added area: background Improvements or additions to extension background script area: popup Improvements or additions to extension popup area: pages Changes to any of extension's pages area: shared Changes to shared libraries and utilities labels Jan 6, 2025
Copy link
Member Author

@sidvishnoi sidvishnoi left a comment

Choose a reason for hiding this comment

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

test-e2e

Copy link
Contributor

github-actions bot commented Jan 6, 2025

Extension builds preview

Name Link
Latest commit 81b21a6
Latest job logs Run #12676435722
BadgeDownload
BadgeDownload

Copy link
Member Author

@sidvishnoi sidvishnoi left a comment

Choose a reason for hiding this comment

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

test-e2e

@github-actions github-actions bot added the area: tests Improvements or additions to tests label Jan 6, 2025
@sidvishnoi sidvishnoi marked this pull request as ready for review January 6, 2025 10:41
@sidvishnoi sidvishnoi merged commit 19bf4b4 into main Jan 8, 2025
8 checks passed
@sidvishnoi sidvishnoi deleted the close-popup-op-grant-tab-open branch January 8, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: background Improvements or additions to extension background script area: pages Changes to any of extension's pages area: popup Improvements or additions to extension popup area: shared Changes to shared libraries and utilities area: tests Improvements or additions to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close popup in Firefox when connecting
2 participants