Allow hotkeys to work in form elements -- we may need to use the underlying Mousetrap...
authorMike Rylander <mrylander@gmail.com>
Tue, 3 Mar 2015 17:23:55 +0000 (12:23 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 8 Jul 2015 18:12:00 +0000 (14:12 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/staff/services/navbar.js

index 37bed18..1d7f0ad 100644 (file)
@@ -42,7 +42,12 @@ angular.module('egCoreMod')
                 // adds a keyboard shortcut
                 // http://chieffancypants.github.io/angular-hotkeys/
                 $scope.addHotkey = function(key, path, desc) {                 
-                    hotkeys.add(key, desc, function(e) { e.preventDefault();  navTo(path); });
+                    hotkeys.add({
+                        combo: key,
+                        allowIn: ['INPUT','SELECT','TEXTAREA'],
+                        description: desc,
+                        callback: function(e) { e.preventDefault();  navTo(path); }
+                    });
                 };
 
                 $scope.retrieveLastRecord = function() {