Bugzilla – Attachment 163109 Details for
Bug 36302
Patron search from search bar broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36302: use replace instead of href
Bug-36302-use-replace-instead-of-href.patch (text/plain), 1.77 KB, created by
Pedro Amorim
on 2024-03-13 11:25:29 UTC
(
hide
)
Description:
Bug 36302: use replace instead of href
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-03-13 11:25:29 UTC
Size:
1.77 KB
patch
obsolete
>From 687e7bbb8ea685b60703cd23f377d9c457151942 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 13 Mar 2024 11:23:13 +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 > >Test plan, ktd: >1) Search henry on the top search bar, notice 1 result is auto suggested >2) Ignore the auto-complete, press 'Enter' instead >3) Notice no results are returned. >4) Apply patch. Repeat. >5) Notice you get redirected to the single result of "henry" >6) Press the browser 'back' button and notice it works as expected (both Chrome+Firefox) >7) Visit patrons home directly: >http://localhost:8081/cgi-bin/koha/members/members-home.pl >8) Notice no search is performed >--- > 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 0968619e833..e678b697920 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36302
:
163096
|
163099
|
163105
|
163106
|
163108
|
163109
|
163113
|
163121
|
163122
|
163207
|
163226
|
163487
|
163917
|
163918
|
163974
|
164002
|
164003
|
164004
|
164005