StractOrg / stract

web search done right
https://stract.com
GNU Affero General Public License v3.0
1.94k stars 43 forks source link

Bug: Search term & optic disappear when using back button #125

Open rrmn opened 4 months ago

rrmn commented 4 months ago
  1. Search for something (e.g. "Land Cruiser 80)
  2. Optional: add optic
  3. Click on first result
  4. Return to search results
  5. Search term (& optic) has (have) disappeared

edit: iOS 17 + Firefox

mikkeldenker commented 4 months ago

Interesting. It works for me in firefox and chrome, but I am able to reproduce this bug in safari. Thanks for the report!

lamemakes commented 1 month ago

This seems to be related to the autocomplete="off" on the search field. I've seen indication that this can effect the re-filling of the forms on selecting the Previous Page button. On Safari, when I swapped off for on it seemed to properly refill the search field. I inspected all the bfcache too and that looked right.

Going to keep digging - DuckDuckGo uses the autocomplete="off" in it's search bar but doesn't have the same issue so it's definitely fixable. I also couldn't recreate the issues with the optic - that seemed to refill out of the box not matter what.