main.js: handle document.activeElement being null
this is technically possible if someone sticks rustdoc in an iframe, i think?
This commit is contained in:
@@ -538,8 +538,8 @@ function preLoadCss(cssUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
if (document.activeElement.tagName === "INPUT" &&
|
||||
if (document.activeElement &&
|
||||
document.activeElement.tagName === "INPUT" &&
|
||||
// @ts-expect-error
|
||||
document.activeElement.type !== "checkbox" &&
|
||||
// @ts-expect-error
|
||||
|
||||
Reference in New Issue
Block a user