Skip to content

Commit

Permalink
fix possibly leaking eventlisteners
Browse files Browse the repository at this point in the history
  • Loading branch information
evayde committed Nov 3, 2024
1 parent 9919e43 commit ec111ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class SlDialog extends ShoelaceElement {
super.disconnectedCallback();
this.modal.deactivate();
unlockBodyScrolling(this);
this.closeWatcher?.destroy();
this.removeOpenListeners();
}

private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default class SlDrawer extends ShoelaceElement {
disconnectedCallback() {
super.disconnectedCallback();
unlockBodyScrolling(this);
this.closeWatcher?.destroy();
this.removeOpenListeners();
}

private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {
Expand Down

0 comments on commit ec111ce

Please sign in to comment.