aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-05 10:09:32 +0200
committerChocobozzz <me@florianbigard.com>2021-05-05 10:09:32 +0200
commit36d9a79f7be85406489491670bda5284fa897d02 (patch)
tree9677d45b600ba7ae44a63734cebd7b384e0c0f37 /client/src/assets
parent36217ac53707ac9bc250fb126c812d26e64b3358 (diff)
downloadPeerTube-36d9a79f7be85406489491670bda5284fa897d02.tar.gz
PeerTube-36d9a79f7be85406489491670bda5284fa897d02.tar.zst
PeerTube-36d9a79f7be85406489491670bda5284fa897d02.zip
Fix player settings dispose
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/videojs-components/settings-menu-button.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts
index e67a3da06..74788a897 100644
--- a/client/src/assets/player/videojs-components/settings-menu-button.ts
+++ b/client/src/assets/player/videojs-components/settings-menu-button.ts
@@ -95,11 +95,6 @@ class SettingsButton extends Button {
95 } 95 }
96 } 96 }
97 97
98 document.removeEventListener('click', this.documentClickHandler)
99 if (this.isInIframe()) {
100 window.removeEventListener('blur', this.documentClickHandler)
101 }
102
103 this.hideDialog() 98 this.hideDialog()
104 99
105 if (this.settingsButtonOptions.entries.length === 0) { 100 if (this.settingsButtonOptions.entries.length === 0) {
@@ -107,6 +102,14 @@ class SettingsButton extends Button {
107 } 102 }
108 } 103 }
109 104
105 dispose () {
106 document.removeEventListener('click', this.documentClickHandler)
107
108 if (this.isInIframe()) {
109 window.removeEventListener('blur', this.documentClickHandler)
110 }
111 }
112
110 onAddSettingsItem (event: any, data: any) { 113 onAddSettingsItem (event: any, data: any) {
111 const [ entry, options ] = data 114 const [ entry, options ] = data
112 115