Disable save hotkey when it is not appropriate
This commit is contained in:
parent
534dffdfe3
commit
ecf4c1e98e
1 changed files with 2 additions and 2 deletions
|
@ -187,8 +187,8 @@ function openEditor() {
|
|||
document.addEventListener("keypress", function (ev) {
|
||||
const accel = ev.ctrlKey || ev.metaKey; // Imprecise, but works cross platform
|
||||
if (ev.key === "Enter" && accel) {
|
||||
//TODO Disable when in the process of saving
|
||||
//TODO Disable when not editing
|
||||
const isEditing = container.classList.contains('edit');
|
||||
if (!isEditing) return;
|
||||
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue