Avoid search auto-focus for modifiers

This commit is contained in:
Andrea Cardaci 2018-05-23 21:43:23 +02:00
parent af346441f2
commit 9bc82744fd

View File

@ -57,7 +57,8 @@
});
addEventListener('keydown', function (event) {
if (event.key.toLowerCase().match(/^[\/a-z]$/)) {
if (event.key.toLowerCase().match(/^[\/a-z]$/) &&
!(event.ctrlKey || event.altKey || event.metaKey)) {
searchBox.focus();
}
});