Fix player settings dispose

This commit is contained in:
Chocobozzz 2021-05-05 10:09:32 +02:00
parent 36217ac537
commit 36d9a79f7b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 8 additions and 5 deletions

View File

@ -95,11 +95,6 @@ class SettingsButton extends Button {
}
}
document.removeEventListener('click', this.documentClickHandler)
if (this.isInIframe()) {
window.removeEventListener('blur', this.documentClickHandler)
}
this.hideDialog()
if (this.settingsButtonOptions.entries.length === 0) {
@ -107,6 +102,14 @@ class SettingsButton extends Button {
}
}
dispose () {
document.removeEventListener('click', this.documentClickHandler)
if (this.isInIframe()) {
window.removeEventListener('blur', this.documentClickHandler)
}
}
onAddSettingsItem (event: any, data: any) {
const [ entry, options ] = data