JBAS-1728 Focus input after dbl-click login button
authorBill Erickson <berickxx@gmail.com>
Wed, 13 Dec 2017 22:39:14 +0000 (17:39 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2
Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js

index 9380c18..2668695 100644 (file)
@@ -47,6 +47,15 @@ function switchTo(str,subpage) {
     dojo.byId('selfckScanBox').focus();
     dojo.byId('selfckScanBox').select();
 
+    // Call these again after a brief timeout to handle things like
+    // unnecessary double-clicks on navigation links, where first 
+    // click focuses, and second causes loss of focus.
+    setTimeout(function(){
+      dojo.byId('selfckScanBox').focus();
+      dojo.byId('selfckScanBox').select();
+    }, 100);
+
+
     // NOTE: switchTo() is called in the midst of various actions, 
     // so we can't clear the notifications here.
     // dojo.byId('oils-selfck-status-div').innerHTML = '';
index 360513e..0284952 100644 (file)
@@ -372,7 +372,7 @@ SelfCheckManager.prototype.loginPatron = function(barcode_or_usrname, passwd) {
     //if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { // password always reqired, per KCLS - fail safe
         if(!passwd) {
             // would only happen in dev/debug mode when using the patron= param
-            alert('password required by org setting.  remove patron= from URL');
+            //alert('password required by org setting.  remove patron= from URL');
             return;
         }