editor: remove useless event

pull/221/head
Varun Patil 2022-11-09 23:02:20 -08:00
parent 0e84a64827
commit 8569af561b
1 changed files with 0 additions and 17 deletions

View File

@ -137,7 +137,6 @@ export default class ImageEditor extends Mixins(GlobalMixin) {
);
this.imageEditor.render();
window.addEventListener("keydown", this.handleKeydown, true);
window.addEventListener("DOMNodeInserted", this.handleSfxModal);
// Get latest exif data
try {
@ -164,7 +163,6 @@ export default class ImageEditor extends Mixins(GlobalMixin) {
this.imageEditor.terminate();
}
window.removeEventListener("keydown", this.handleKeydown, true);
window.removeEventListener("DOMNodeInserted", this.handleSfxModal);
}
onClose(closingReason, haveNotSavedChanges) {
@ -298,21 +296,6 @@ export default class ImageEditor extends Mixins(GlobalMixin) {
).click();
}
}
/**
* Watch out for Modal inject in document root
* That way we can adjust the focusTrap
*
* @param {Event} event Dom insertion event
*/
handleSfxModal(event) {
if (
event.target?.classList &&
event.target.classList.contains("SfxModal-Wrapper")
) {
emit("viewer:trapElements:changed", event.target);
}
}
}
</script>