From 9aa6d68f94e45b88b8b87932344cc1f8abd9589c Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 13 Mar 2024 10:30:39 +0000 Subject: [PATCH] Bug 36302: Use replace instead of href This will change URL but not fiddle with browser history. Works the same (and as expected) in both Chrome and Firefox --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 9cabd070387..bbb7da67cb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -393,7 +393,7 @@ let url = '[% redirect_url | url %]'.indexOf("?") != -1 ? '[% redirect_url | url %]&borrowernumber=' + json.data[0].patron_id : '[% redirect_url | url %]?borrowernumber=' + json.data[0].patron_id; - document.location.href = url; + window.location.replace(url); return false; } first_draw = 0; -- 2.30.2