From 547374aa6d6ebfba1ae80ab544df034a0bbaffd5 Mon Sep 17 00:00:00 2001 From: Erik Thiele Date: Fri, 31 Jul 2026 13:02:08 +0200 Subject: [PATCH] Fix facet_sort dropdown silently failing to navigate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The onchange handler used `new URL(location)`. Inline event handler attributes execute inside an implicit `with(document){...}` scope, and `document.URL` is a built-in string property — so the bare `URL` identifier resolved to that string instead of the global URL constructor, throwing "URL is not a constructor" on every change. The error wasn't visible anywhere in the UI, so the dropdown appeared to update (its own selected option changed) while the page silently never navigated, and a reload reverted it to the default. Fix: reference `window.URL` explicitly to bypass the shadowing. Verified the dropdown now actually re-sorts the sidebar and the change survives a reload on both the Links and Prompts pages. Co-Authored-By: Claude Sonnet 5 --- app/templates/index.html | 2 +- app/templates/prompts.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index c220e88..de9e4e9 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -12,7 +12,7 @@
- {% for value, label in facet_sort_options.items() %}