Skip to content

Commit

Permalink
another fix on shortcuts while in input box
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAF committed Jun 24, 2024
1 parent 95e6386 commit 9495666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/keyboard_shortcuts/keyboard_shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Plugins.keyboard_shortcuts.init = async function () {
// catch all key presses
$(document).on('keydown', function (e) {
// check if we are focusiing an input
// var on_input = !!($('input:focus').length && $('input:focus')[0].type === 'text');
var on_input = !!($(':focus').is('input'));
var on_input = !!($('input:focus').length && ($('input:focus')[0].type === 'text' || $('input:focus')[0].type === 'number'));
// var on_input = !!($(':focus').is('input:text'));

// handle the global shortcuts, which will work even if an input is focused
// please use modifier keys (like ctrl and alt) always
Expand Down

0 comments on commit 9495666

Please sign in to comment.