Open mrgreekgeek opened 1 month ago
Is this a regression/ did this use to work?
I don't know for sure. 😢 My guess is that it hasn't ever worked.
It looks like we want to fire Search
for the popstate
event.
This code in window.onload
should be written as a lambda and called for both by popstate
and onload
.
//search for any provided terms
let urlSearchTerm = getURLParameter('search');
if (urlSearchTerm) {
domSearchInput.value = urlSearchTerm;
search(urlSearchTerm);
Ideally if I search for more than one word, the browser's back button should take me back to the previously searched word. Currently the URL does change, but it doesn't actually update the page.