extension icon indicating copy to clipboard operation
extension copied to clipboard

UI closes when switching tabs or window

Open marceljay opened this issue 4 years ago • 6 comments

On Firefox 79, macOS Catalina:

When creating a new account from a new seed, the moment you switch tabs to paste the seed phrase, the UI closes and you have to restart the process. A user not paying attention could even restart the process, not noticing a new seed phrase, thinking they already copied it and thus creating a new account which they have not stored the seed phrase for.

Proposed solution: When switching back to the window or tab, and opening the extension from the button, the last state should appear again, at least for some time (e.g. 240 seconds) to save the seed in e.g. a password manager.

marceljay avatar Jul 31 '20 14:07 marceljay

Regarding the implementation, I'm thinking about context variable that is set to {mnemonic, ttl: now() + 2min} that would allow an automatic redirection. The one part that bothers me is the TTL reset. As long as there is no interaction, the variable with the mnemonic will stay in memory, potentially longer than 2min. We could eventually take advantage of chrome.alarm to make sure the variable is effectively reset. What do you think?

Tbaut avatar Sep 23 '20 13:09 Tbaut

It is fine if it is active in the background page, it is not accessible. (So the timeout needs to be managed there)

jacogr avatar Sep 23 '20 14:09 jacogr

Easy solution that other wallets use is to open a new browser tab when doing this. You don't lose state there.

The proposed solution is probably not ideal, because:

  1. you will be sending and storing mnemonic
  2. when the timer expires which is probably not seen by the user, it will be a problem anyway. (Unless you explicitly show timer for the account).

The question then is with this solution, how long do you want that timer to be? Since user might want to also write it down and can close the popup while reading a guide for example (this "bug" occured to some users when they were claiming and reading a guide).

I can also see a possibility of unwanted mnemonic storage persistence. Don't see direct problem on the first sight, but it should be considered.

jak-pan avatar Mar 09 '21 14:03 jak-pan

Indeed, the opening the account in a tab is imho, an acceptable workaround and one that is available to all users. Not perfect, but doesn't close on the user.

Longer-term would love to move all the vault views/management to only operate in a tab (lots more real-estate to play with), but it has not had any focus.

jacogr avatar Mar 09 '21 14:03 jacogr

I noticed metamask has similar problems which also get annoying when you need to copy an address and e.g. and exact amount, I found myself sometimes using the "separate tab option".
And it does not seem the extension causing this issue, but the browsers that close it when tab/window is switched. Is it not possible to give the extension a view state that will be shown when the extension is clicked again?

marceljay avatar Mar 09 '21 15:03 marceljay

@![unnamed](https://user-images.githubusercontent.com/115646489/225676909-a2c16227-7929-4d3e-867f-3fa0c629fce4.jpg)

luyenheo avatar Mar 16 '23 15:03 luyenheo