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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error
|
if (document.activeElement &&
|
||||||
if (document.activeElement.tagName === "INPUT" &&
|
document.activeElement.tagName === "INPUT" &&
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
document.activeElement.type !== "checkbox" &&
|
document.activeElement.type !== "checkbox" &&
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
Reference in New Issue
Block a user