From 6647a3e9a43232b120ab90a7a11a6a06d59e9afe Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 3 Mar 2015 12:23:55 -0500 Subject: [PATCH] Allow hotkeys to work in form elements -- we may need to use the underlying Mousetrap library directly, however Signed-off-by: Mike Rylander --- Open-ILS/web/js/ui/default/staff/services/navbar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/navbar.js b/Open-ILS/web/js/ui/default/staff/services/navbar.js index 37bed1876a..1d7f0adb07 100644 --- a/Open-ILS/web/js/ui/default/staff/services/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js @@ -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() { -- 2.11.0