pull/1836/head
Cory LaViska 2024-01-23 11:10:09 -05:00
rodzic cb15749500
commit 8473d06822
3 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -231,7 +231,7 @@ export default class SlSelect extends ShoelaceElement implements ShoelaceFormCon
this.hide();
this.displayInput.focus({ preventScroll: true });
}
}
};
}
root.addEventListener('focusin', this.handleDocumentFocusIn);
root.addEventListener('keydown', this.handleDocumentKeyDown);

Wyświetl plik

@ -186,7 +186,9 @@ export default class SlTooltip extends ShoelaceElement {
if ('CloseWatcher' in window) {
this.closeWatcher?.destroy();
this.closeWatcher = new CloseWatcher();
this.closeWatcher.onclose = () => { this.hide() };
this.closeWatcher.onclose = () => {
this.hide();
};
} else {
document.addEventListener('keydown', this.handleDocumentKeyDown);
}

Wyświetl plik

@ -21,8 +21,8 @@ interface CloseWatcher extends EventTarget {
close(): void;
destroy(): void;
oncancel: ((event: Event) => void | null);
onclose: ((event: Event) => void | null);
oncancel: (event: Event) => void | null;
onclose: (event: Event) => void | null;
}
declare const CloseWatcher: CloseWatcher;