Riot.im local storage lost when closing tab
I am trying to use the official release instance of the Riot client for Matrix at https://riot.im/app . I have configured Tor Browser to keep site data for riot.im. Security level is Standard.
When I log into Riot, I can see in TB's Storage Inspector that data is written to IndexedDB and Local Storage. When I close the Riot tab and reopen Riot in a new tab, I am no longer logged in. In Storage Inspector, the IndexedDB data seems to persist (even over browser restarts, as intended), but Local Storage was not kept when closing the tab and a new guest session is written.
I have reproduced this problem on Riot v0.17.8 and later, as well as Tor Browser 8.0.4 and later. It does not occur on Firefox ESR. Without persistent Local Storage, it is not possible to use the device-based E2E encryption that Matrix offers, because old messages will not decrypt properly and all communication partners have to re-verify my "devices" every time I close the tab and log back in.
IMO, Tor Browser should keep all data stored by sites that are explicitly whitelisted by the user, not just cookies and IndexedDB.