fixing keyboard shortcuts when dialog is open

master
Mark MacKay 2021-04-12 12:54:13 -05:00
parent d58281175b
commit 323fce2fe1
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,7 @@ MD.Keyboard = function(){
// keyboard shortcut exists
if (keys[key]) {
if (editor.modal.isVisible()) return;
e.preventDefault();
keys[key]();
}

View File

@ -53,7 +53,12 @@ MD.Modal = function(){
}
};
function isVisible(){
return $('#svg_source_editor').is(":visible");
}
this.cancelOverlays = cancelOverlays;
this.isVisible = isVisible;
this.viewSource = viewSource;
this.saveSource = saveSource;