lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

Open and close the extension-popup lead to lost navigation-state and lost filled inputs

Open bitcoinuser opened this issue 3 years ago • 4 comments

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

bitcoinuser avatar Oct 06 '22 01:10 bitcoinuser

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.

escapedcat avatar Oct 06 '22 02:10 escapedcat

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.

reneaaron avatar Oct 06 '22 09:10 reneaaron

I would like to work on this issue.

ranjithjupaka avatar Oct 14 '22 06:10 ranjithjupaka

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?

escapedcat avatar Oct 14 '22 13:10 escapedcat

Closing as duplicate of: https://github.com/getAlby/lightning-browser-extension/issues/474

bitcoinuser avatar Oct 22 '22 02:10 bitcoinuser

Hm, closing with reason always uses "not planned". Closing because of "duplicate", thanks @bitcoinuser

escapedcat avatar Oct 22 '22 15:10 escapedcat