Skip to content

Commit

Permalink
Update FileManager.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Apr 3, 2024
1 parent e10cc45 commit 90dc444
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions resources/js/components/FileManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ export default {
this.options = options;
});
document.addEventListener('keydown', (event) => {
if (this.modal && this.options.modalIsInFront && event.code === 'Escape') {
this.closeModal();
} else {
if (CKEDITOR.dialog.getCurrent() !== null) {
CKEDITOR.dialog.getCurrent().hide();
if (event.code === 'Escape') {
if (this.modal && this.options.modalIsInFront) {
this.closeModal();
} else {
if (CKEDITOR.dialog.getCurrent() !== null) {
CKEDITOR.dialog.getCurrent().hide();
}
}
}
});
Expand Down

0 comments on commit 90dc444

Please sign in to comment.