Web Client - Place Hold Requires Two Clicks on Submit

Bug #1778606 reported by Jennifer Pringle
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Evergreen
Status tracked in Main
3.1
Won't Fix
Medium
Unassigned
3.2
Won't Fix
Medium
Unassigned
3.3
Won't Fix
Medium
Unassigned
Main
Fix Released
Medium
Unassigned

Bug Description

Evergreen 3.1

When placing a hold in the web client through the catalogue if you enter a patron's barcode and click Submit nothing appears to happens. You have to click Submit a second time for the hold to be placed.

It looks like the issue is that the cursor is in the patron barcode field. The first time you click Submit the cursor is cleared from the patron barcode field. As well, if you click elsewhere on the screen before clicking Submit the hold is placed first try as expected.

I also tested in the xul client on 2.12 and while the cursor shows in the patron barcode field you only have to click Submit once for the hold to be placed.

Revision history for this message
Terran McCanna (tmccanna) wrote :

Are you typing the patron's barcode or scanning it?

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

We're seeing this when the barcode is typed in, pasted in, or scanned in.

Revision history for this message
John Amundson (jamundson) wrote :

I was just coming here to report this bug.

We are also seeing this. Evergreen 3.0.8.

The library that reported this claims it only happens when typing in a barcode, not when scanning.

If typing the barcode in, I find hitting "Tab" instead of "Enter" results in only having to click Submit once. This follows the cursor focus issue as described by Jennifer.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Terran McCanna (tmccanna) wrote :

It's working as I expect it to on 3.0.2 - if typing or pasting it in, I click tab or enter to load the patron notification preferences, and then click Submit. If scanning it, my barcode scanner is configured with an automatic return, so it loads the patron notification preferences and then I click Submit.

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

In 2.12 in the xul client the patron notification preferences appeared without the need to click tab or enter (regardless of whether the barcode was typed or scanned).

Revision history for this message
Dan Briem (dbriem) wrote :

The barcode lookup runs on the input's onchange and onkeypress (Enter) and disables the submit button until a patron is loaded.

If you type a barcode and click Enter the patron lookup runs. If your next click is the submit button (and the focus was still in the barcode input) the barcode input's onchange fires and the lookup runs again. This temporarily disables the submit button, so you get a mousedown, but no mouseup, the click event doesn't fire, and the form doesn't submit. Click again and it places the hold.

This branch for testing is one potential solution. It removes onchange and automatically runs the lookup once you stop typing for 500ms. It uses onkeydown instead of onkeypress because that wouldn't include keys like backspace and onkeyup fires too late for the enter key (it would submit the hold form). The enter key and onpaste still run the lookup immediately and the patron search triggers keydown "enter" now instead of onchange.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbriem/lp1778606_place_hold_click_twice

tags: added: pullrequest
Changed in evergreen:
assignee: nobody → Jason Etheridge (phasefx)
Revision history for this message
Jason Etheridge (phasefx) wrote :

This works great for me; pushed to master. Thanks Dan!

Revision history for this message
Jason Etheridge (phasefx) wrote :

tested in Chrome and Firefox

Changed in evergreen:
assignee: Jason Etheridge (phasefx) → nobody
Andrea Neiman (aneiman)
Changed in evergreen:
importance: Undecided → Medium
milestone: none → 3.4.1
tags: added: signedoff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.