Fixed one-letter hotkeys not firing in radioboxes
This commit is contained in:
parent
09d8e5ae1c
commit
e7e50cfb3a
1 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue