[Koha-devel] Need help with bug 26247

Mark Alexander marka at pobox.com
Mon May 2 22:18:35 CEST 2022


It used to be that at our library, we could check the status of a pile
of books by using "Search the catalog" in the search box at the top of
most pages.  You could just keep scanning barcodes without having to
do anything with the mouse or keyboard.  This is very useful when you
have a library with volunteers who are not very careful about checking
in returned books.

Then at some point, Koha 20.05 broke this functionality by always
populating the search box with the last barcode scanned.  Now you have
to manually erase everything in the search box before scanning each
book.  We are now using 20.05.15, but the same bug exists in 21.11.02.

I have been struggling for several days with trying to find a
temporary fix for this problem.  There was a suggested quick fix in
Javascript at the end of bug 26247, but that didn't work for me, as I
mentioned in a comment on that bug.

Then I tried hacking the function keep_text in staff-global.js,
because in bug 19046, which was supposedly the source of the problem,
keep_text seemed like where the action was taking place.  But hacking
that function had no effect; in fact, when I set a breakpoint in that
function in Firefox, it was never hit.  I think this is because
keep_text is only triggered by a mouse click event, not by a form
reload.

So now I've been trying to find out where the search box is getting
filled with the last search string after you hit the Search button.  I
am not super-familiar with the Koha code, but I'm comfortable hacking
on it if I know where to look.  Any help with finding the source of
the search box autofill would be greatly appreciated.

-- 
Maybe I'm lucky to be going so slowly because I may
be going in the wrong direction. --Ashleigh Brilliant


More information about the Koha-devel mailing list