Skip to content

Commit

Permalink
Fix: Do not destroy fullscreen on viewer destroy (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Press authored Feb 19, 2019
1 parent 3121a48 commit adca14f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/viewers/BaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class BaseViewer extends EventEmitter {
});
}

fullscreen.destroy();
fullscreen.removeAllListeners();
document.defaultView.removeEventListener('resize', this.debouncedResizeHandler);
this.removeAllListeners();

Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/media/MediaControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class MediaControls extends EventEmitter {
}

if (fullscreen) {
fullscreen.destroy();
fullscreen.removeAllListeners();
}

this.wrapperEl = undefined;
Expand Down

0 comments on commit adca14f

Please sign in to comment.