From 8d975d40eb885c1d4b2733fce01fa30d39ea5186 Mon Sep 17 00:00:00 2001 From: Pieter Lambrecht Date: Fri, 18 Mar 2022 10:59:18 +0100 Subject: [PATCH] Fix activeElement possible null --- netbox/project-static/dist/netbox.js | Bin 375658 -> 375689 bytes netbox/project-static/dist/netbox.js.map | Bin 344957 -> 344974 bytes netbox/project-static/src/netbox.ts | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index c1116d1dc118d0ea396060ed52ce49d6f42fb10a..9215625c8fb226f5e579c58280312ec7ea75ef82 100644 GIT binary patch delta 39 vcmaF$O|0{~SVIeA3sVbo3(FSP)GeHfwzhetIXP--lMCC#wx@1kWn~8dIbjYZ delta 25 hcmeDDF81o1SVIeA3sVbo3(FSP)Ggavwy?6Y0|1hz3Hbm3 diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index a5ba2036c186a4ebe7276da460aef98eacfa468d..780aa7e03374df2df8ae9fdfa76d0d85132c86b1 100644 GIT binary patch delta 38 tcmey{Cfe67+R(z-!qmdt!m@>x#hEqT$x#d*4@Gph(whTC*)XVzo@vsej& diff --git a/netbox/project-static/src/netbox.ts b/netbox/project-static/src/netbox.ts index 656ed56e5..25a439eac 100644 --- a/netbox/project-static/src/netbox.ts +++ b/netbox/project-static/src/netbox.ts @@ -38,7 +38,7 @@ function initDocument(): void { function initWindow(): void { const contentContainer = document.querySelector('.content-container'); - if (contentContainer !== null && document.activeElement.tagName.toUpperCase() !== 'INPUT') { + if (contentContainer !== null && document.activeElement !==null && document.activeElement.tagName.toUpperCase() !== 'INPUT') { // Focus the content container for accessible navigation, unless an input item has focus contentContainer.focus(); }