==== What is the problem?
I have seen two cases so far where Edit Recovery data has been cleared unexpectedly after a soft refresh.
**Case one:**
While editing, if I soft refresh the page twice in a row the Edit Recovery data in IndexedDB for that page will be cleared.
**Case two:**
While editing, if I soft refresh the page and then leave the edit screen (e.g. navigate away or close the tab) the IndexedDB data for that page is cleared.
I have only been able to reproduce this on Firefox so far, and only if I soft refresh. I have tried Chrome and Safari but no success yet.
==== Steps to reproduce problem
**Case one:**
# In Firefox, open https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Conflict-title-0.6832584036805363-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&action=edit
# Type something in the editor window (but don't save)
# Open devtools, go to the Storage tab, expand "Indexed DB" and all its submenus until you see an item called "unsaved-page-data", click on it to check that there is some data stored for this page (the key will be the name of the page)
# Soft refresh (ctrl+r)
# When the page reloads, soft refresh again
**Expected behaviour:** Checking Indexed DB again the data should not have changed.
**Observed behaviour:** The data is no longer in Indexed DB. If you perform a hard refresh (ctrl+shift+r) the edit you made in step 2 will not be recovered.
**Case two:**
# In Firefox, open https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Conflict-title-0.6832584036805363-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&action=edit
# Type something in the editor window (but don't save)
# Open devtools, go to the Storage tab, expand "Indexed DB" and all its submenus until you see an item called "unsaved-page-data", click on it to check that there is some data stored for this page (the key will be the name of the page)
# Soft refresh (ctrl+r)
# Click on "Edit Source"
**Expected behaviour:** Edit gets restored.
**Observed behaviour:** Edit does not get restored. Article is as it was in step 1. Not data is in IndexedDB.
==== Environment
**Browser:** Firefox 115 (Debian) and 119 (Windows 11).
**Wiki(s):** https://en.wikipedia.beta.wmflabs.org MediaWiki 1.42.0-alpha (dcd8a21) 03:06, 23 November 2023.
**Editor:** WikiEditor 0.5.4 (68da956) 07:21, 22 November 2023.