diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index f7a0642ce..bb5642704 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -242,8 +242,6 @@ this.currentlyAttached = false; - this.canvas.unattach(); - this.buttons.unattach(); this.$postDiv.off( '.lip' ); @@ -258,6 +256,9 @@ this.optionsDialog.unattach(); this.optionsDialog.closeDialog(); + // Canvas listens for events from dialogs, so should be unattached at the end + this.canvas.unattach(); + this.clearEvents(); // We trigger this event on the document because unattach() can run