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

Re-focus the popup between requests #1315

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

arjun-dureja
Copy link
Contributor

@arjun-dureja arjun-dureja commented Jun 6, 2024

Summary

  • It's possible for a user to leave the popup open between requests, especially after onboarding when the popup is not closed programmatically. Because of this, when a new request comes through, the popup doesn't re-focus itself and updates in the background. This leads to a bad UX since the user can't see the popup and has to manually re open it.
    • This PR simply calls popup.focus() every time a new request comes to an already open popup. This ensures that the popup doesn't stay hidden in the background when a user performs an action on a dapp

How did you test your changes?

  • Manually and unit tests

BEFORE:

Screen.Recording.2024-06-06.at.4.19.33.PM.mov

AFTER:

Screen.Recording.2024-06-06.at.4.17.27.PM.mov

@arjun-dureja arjun-dureja marked this pull request as ready for review June 6, 2024 20:33
Copy link
Contributor

@nateReiners nateReiners left a comment

Choose a reason for hiding this comment

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

lgtm, good idea! 👍

@arjun-dureja arjun-dureja merged commit 4c7969f into master Jun 6, 2024
9 checks passed
@arjun-dureja arjun-dureja deleted the arjun/refocusPopup branch June 6, 2024 23:19
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