block delete shortcut when focusing an input #68

This commit is contained in:
vcoppe
2024-08-23 10:31:02 +02:00
parent e42dd6e144
commit c1faea787a

View File

@@ -499,12 +499,14 @@
dbUtils.undo();
}
} else if ((e.key === 'Backspace' || e.key === 'Delete') && (e.metaKey || e.ctrlKey)) {
if (e.shiftKey) {
dbUtils.deleteAllFiles();
} else {
dbUtils.deleteSelection();
if (!targetInput) {
if (e.shiftKey) {
dbUtils.deleteAllFiles();
} else {
dbUtils.deleteSelection();
}
e.preventDefault();
}
e.preventDefault();
} else if (e.key === 'a' && (e.metaKey || e.ctrlKey)) {
if (!targetInput) {
selectAll();