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:
parent
f5efd2aba3
commit
ab180c29e3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue