remove event listeners

This commit is contained in:
KDSBrowne 2017-02-24 10:54:52 -08:00
parent b0dfa33723
commit 1de05d1f23

View File

@ -24,10 +24,10 @@ export default class SettingsDropdownContainer extends Component {
}
componentWillUnmount() {
document.addEventListener("fullscreenchange", this.fullScreenToggleCallback);
    document.addEventListener("webkitfullscreenchange", this.fullScreenToggleCallback);
    document.addEventListener("mozfullscreenchange", this.fullScreenToggleCallback);
    document.addEventListener("MSFullscreenChange", this.fullScreenToggleCallback);
document.removeEventListener("fullscreenchange", this.fullScreenToggleCallback);
    document.removeEventListener("webkitfullscreenchange", this.fullScreenToggleCallback);
    document.removeEventListener("mozfullscreenchange", this.fullScreenToggleCallback);
    document.removeEventListener("MSFullscreenChange", this.fullScreenToggleCallback);
}
fullScreenToggleCallback() {