lightning-browser-extension
lightning-browser-extension copied to clipboard
Open and close the extension-popup lead to lost navigation-state and lost filled inputs
Describe the bug
Go to send window and fill the comment field. Close Alby window and open again, the info you filled will be lost and you will need to fill it again.
Screenshots of the changes [optional]
Gravação de tela de 05-10-2022 22:39:20.webm
To Reproduce
Steps to reproduce the behavior:
See the video
Expected behavior
If I fill some info and I need to close Alby window but then I open Alby again on the same website, the info I previously filled should appear and not be lost as happens today. Alby should open on the same window and with same info when I closed it.
Alby information
- Alby Version: 1.17
Are you working on this issue?
No
Closing and open an extension-popup is like a hard website reload. Navigationstate and input is lost. Not sure if this possible to solve without a big effort. Wondering how other extensions handle this. i.e. metamask. I believe @dvoroneca noticed this before as well.
I've noticed the same behavior in other browser extensions as well and I think there is no easy solution to this problem.
https://github.com/bitwarden/clients/issues/3013
As @escapedcat noted the page is reloaded which would require us to persist (and re-hydrate) the current state of the popup into some kind of sessionStorage (which I think is quite a hard thing to do, especially for e.g. form states that are not part of the routing).
As a workaround you should be able to open the extension page in a new window by clicking "websites" in the dropdown menu of the extension.
I would like to work on this issue.
I would like to work on this issue.
Uhm, we're not sure we really want to do that. How would you tackle this? Maybe you can write down some steps/keywords/ideas first before we continue?
Closing as duplicate of: https://github.com/getAlby/lightning-browser-extension/issues/474
Hm, closing with reason always uses "not planned". Closing because of "duplicate", thanks @bitcoinuser