cleanup listener

pull/463/head
Cory LaViska 2021-06-05 12:28:35 -04:00
rodzic 501869c7aa
commit 0b44fba68c
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
## Next
- Fixed a bug in `sl-dropdown` where a `keydown` listener wasn't cleaned up properly
- Fixed a bug in `sl-select` where no selection with `multiple` resulted in an incorrect value [#457](https://github.com/shoelace-style/shoelace/issues/457)
- Fixed a bug in `sl-select` where `sl-change` was emitted immediately after connecting to the DOM [#458](https://github.com/shoelace-style/shoelace/issues/458)

Wyświetl plik

@ -392,7 +392,7 @@ export default class SlDropdown extends LitElement {
this.slHide.emit();
this.panel.removeEventListener('sl-activate', this.handleMenuItemActivate);
this.panel.removeEventListener('sl-select', this.handlePanelSelect);
document.addEventListener('keydown', this.handleDocumentKeyDown);
document.removeEventListener('keydown', this.handleDocumentKeyDown);
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
await stopAnimations(this);