cleanup just in case

This commit is contained in:
Cory LaViska
2023-12-01 10:02:12 -05:00
parent 10d9358753
commit 6e335f9a63

View File

@@ -106,8 +106,9 @@ export default class SlTooltip extends ShoelaceElement {
this.addEventListener('mouseout', this.handleMouseOut);
}
connectedCallback() {
super.connectedCallback();
disconnectedCallback() {
// Cleanup this event in case the tooltip is removed while open
document.removeEventListener('keydown', this.handleDocumentKeyDown);
}
firstUpdated() {