block delete shortcut when focusing an input #68
This commit is contained in:
parent
e42dd6e144
commit
c1faea787a
1 changed files with 7 additions and 5 deletions
|
@ -499,12 +499,14 @@
|
||||||
dbUtils.undo();
|
dbUtils.undo();
|
||||||
}
|
}
|
||||||
} else if ((e.key === 'Backspace' || e.key === 'Delete') && (e.metaKey || e.ctrlKey)) {
|
} else if ((e.key === 'Backspace' || e.key === 'Delete') && (e.metaKey || e.ctrlKey)) {
|
||||||
|
if (!targetInput) {
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
dbUtils.deleteAllFiles();
|
dbUtils.deleteAllFiles();
|
||||||
} else {
|
} else {
|
||||||
dbUtils.deleteSelection();
|
dbUtils.deleteSelection();
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
}
|
||||||
} else if (e.key === 'a' && (e.metaKey || e.ctrlKey)) {
|
} else if (e.key === 'a' && (e.metaKey || e.ctrlKey)) {
|
||||||
if (!targetInput) {
|
if (!targetInput) {
|
||||||
selectAll();
|
selectAll();
|
||||||
|
|
Loading…
Reference in a new issue