fix(js): switching source after reset uses old query
Alan Pearce alan@alanpearce.eu
Tue, 11 Mar 2025 12:40:33 +0100
1 files changed, 5 insertions(+), 0 deletions(-)
jump to
M frontend/static/search.js → frontend/static/search.js
@@ -133,6 +133,11 @@ resultsRange.deleteContents(); state.results = ""; history.pushState(state, null, ev.target.href); ev.preventDefault(); + document.querySelectorAll("nav > a:not(.current)").forEach(function (node) { + const u = new URL(node.href); + u.search = ""; + node.href = u.toString(); + }); queryInput.value = ""; });