1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-12 15:14:12 +00:00

fix(webui): dispatch close events when closing popups (#7340)

* fix: dispatch `close` event in statistics dialogue

* fix: properly dispatch `close` event in pref dialogue
This commit is contained in:
Yat Ho 2024-12-29 15:39:56 +08:00 committed by GitHub
parent 7820f54ba1
commit 536fe4a6e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -856,7 +856,7 @@ export class PrefsDialog extends EventTarget {
this.update_from_session,
);
this.elements.root.remove();
dispatchEvent(new Event('close'));
this.dispatchEvent(new Event('close'));
for (const key of Object.keys(this)) {
this[key] = null;
}

View file

@ -33,6 +33,7 @@ export class StatisticsDialog extends EventTarget {
if (!this.closed) {
clearInterval(this.interval);
this.elements.root.remove();
this.dispatchEvent(new Event('close'));
for (const key of Object.keys(this)) {
delete this[key];
}