[Bug]: MetaMask popup not closed when new popup opened
Describe the bug
MetaMask popup not closed when popup in another window opened. (supposed to be fixed by this https://github.com/MetaMask/metamask-extension/pull/23771 ?) Navigation between unapproved transactions is not available.
Expected behavior
MetaMask popup should close when other popups opened.
Screenshots/Recordings
https://github.com/MetaMask/metamask-extension/assets/104780023/baf0c210-d3fe-407d-9c67-ab4ec1d28902
https://github.com/MetaMask/metamask-extension/assets/104780023/d07e7b0f-6a72-4b34-be03-9215ea088b28
Steps to reproduce
- Trigger MM popup
- Don't confirm the transaction
- Open new window
- Click on MM icon
- Notice that MM popup is open in two windows
- Trigger new popup
- See MM icon shows 2 unapproved transactions but navigation between them is unavailable
Error messages or log output
No response
Version
11.17.0
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
Severity
No response
Can confirm this issue, though it shouldn't be new with v12. The popup (via clicking the metamask icon) is considered different than the confirmation popup, so we'll need to enforce closure there as well.
Removing regression label, unless we can confirm behavior changed with v12. Expected behavior. The same confirmation request is shown in the popup because it's still in state (it has not been confirmed/denied). test/e2e/json-rpc/switchEthereumChain.spec.js that includes the described scenario and behavior.
Not considered a but, but UX improvements can be made. Adding to design backlog.
WHEN Confirmation is pending AND User opens pop-up THEN Block interaction with wallet until confirmation is confirmed or rejected
Currently, we block interaction by showing the pending confirmation in the pop-up. This creates confusion in where confirmations appear. For consistent confirmation behavior we want tx confirmations to always and only appear in the confirmation window. When the popup is opened and a confirmation is pending, we need a design that blocks interaction and enabled users to open the notification window.