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:
parent
7820f54ba1
commit
536fe4a6e1
2 changed files with 2 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue