mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 13:21:44 +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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user