web/admin: workaround for tenant certificate selection being cut off (#4820)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

#4814
This commit is contained in:
Jens L
2023-03-01 15:41:28 +01:00
committed by GitHub
parent 9042664fcf
commit 87fa50c492
2 changed files with 35 additions and 32 deletions

View File

@ -268,7 +268,10 @@ export class SearchSelect<T> extends AKElement {
@blur=${(ev: FocusEvent) => {
// For Safari, we get the <ul> element itself here when clicking on one of
// it's buttons, as the container has tabindex set
if ((ev.relatedTarget as HTMLElement).id === this.dropdownUID) {
if (
ev.relatedTarget &&
(ev.relatedTarget as HTMLElement).id === this.dropdownUID
) {
return;
}
// Check if we're losing focus to one of our dropdown items, and if such don't blur