[Koha-devel] Need help with bug 26247
Fridolin SOMERS
fridolin.somers at biblibre.com
Thu May 5 08:40:47 CEST 2022
Hi,
I propose a really quick-fix directly on templates in comment :
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26247#c29
Best regards,
Le 04/05/2022 à 02:10, Mark Alexander a écrit :
> After spending time in the browser debugger, I have more information.
>
> 1. The keep_text function in staff-global.js only gets called when
> you click on the "Check out", "Check in", or "Renew" links under
> the search box; that is, when you change the type of search you
> desire. But that is not the situation I'm talking about in
> our library's workflow. We select "Search the catalog" and
> then repeatedly enter barcodes in the search box. In that situation,
> keep_text never gets called, and the last search string (the
> last barcode) persists and has to be erased manually after
> each submit.
>
> 2. I have disabled the code in search.pl that fills in the search
> box by this trick:
>
> # if a simple search, display the value in the search box
> if (0 && $operands[0] && !$operands[1]) {
>
> But it has no effect.
>
> 3. The Javascript snippet that was suggested for IntranetUserJS does
> in fact get called. I verified this by modifying it to put a "bogus"
> string in the search box, as follows:
>
> $(document).ready(function() {
> $("#header_search #catalog_search input[name='q']").val("bogus");
> });
>
> When I put a breakpoint at this function, then step over it, I see the
> string "bogus" put into the search box as expected. But then when I
> continue execution, the original search string (a book barcode) is put
> into the search box, overwriting "bogus". This is the mystery I am
> trying to solve.
>
> I have tried setting a "break on attribute modifications" breakpoint
> on the text input field but it never gets hit.
>
--
Fridolin SOMERS <fridolin.somers at biblibre.com>
Software and system maintainer 🦄
BibLibre, France
More information about the Koha-devel
mailing list