From e7e50cfb3a1b0980d44efcaa554b43f710d105ae Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 19 Mar 2015 23:02:53 +0100 Subject: [PATCH] Fixed one-letter hotkeys not firing in radioboxes --- public_html/js/Keyboard.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public_html/js/Keyboard.js b/public_html/js/Keyboard.js index 76234878..5361d5d1 100644 --- a/public_html/js/Keyboard.js +++ b/public_html/js/Keyboard.js @@ -14,8 +14,14 @@ App.Keyboard = function(jQuery, mousetrap) { return false; } var $focused = jQuery(':focus').eq(0); - if ($focused.length && $focused.prop('tagName').match(/embed|object/i)) { - return true; + if ($focused.length) { + if ($focused.prop('tagName').match(/embed|object/i)) { + return true; + } + if ($focused.prop('tagName').toLowerCase() === 'input' + && $focused.attr('type').match(/checkbox|radio/i)) { + return false; + } } return oldStopCallback.apply(mousetrap, arguments); };