Comment 1 for bug 1560601

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I'm been looking into this more, and have something that seems to work. We keep getting reports of people that think they have checked everything out, but have not. We have a problem with people never looking at the screen and thinking that the barcode scanner beep means that the checkout was successful. For some reason some scans are not registering with the self check, I'm assuming some of them are because the focus isn't in the scanbox, so I'm trying to get rid of at least that issue if possible.

The first fix is to register a onclick handler for the HTML element that returns focus to the scanbox any time anything is clicked. This keeps a random click/touch of the touch screen from sabotaging the next users first scan.

The next fix is to add an onkeyup handler that looks for a tab keypress, and returns the focus to the scanbox. This requires that there always be an extra element in the tabindex for the focus to move to first. If no other elements are available, the browser (firefox/openkiosk) will take the focus to the browser UI, which isn't possible to handle. So I added a <a>.</a> element hidden in the borders, So the scanbox will always have something to tab to.

I disable the tab hijacking for the payments page, so users can tab through the form there. I still need to work on re-enabling the tab hijack when you leave the payment page.

I added a bit that makes sure that the first field in the payments tab gets focus, so users can just start typing.

I don't have a branch ready to share yet, I want to do some more testing and try it out in production.

Josh