fix(result page): cannot take screenshot if crt funbox is active (fehmer) (#4755)

This commit is contained in:
Christian Fehmer 2023-11-03 14:05:33 +01:00 committed by GitHub
parent 59d3749449
commit 64f49154b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,6 +429,9 @@ export async function screenshot(): Promise<void> {
}
(document.querySelector("html") as HTMLElement).style.scrollBehavior =
"smooth";
FunboxList.get(Config.funbox).forEach((f) =>
f.functions?.applyGlobalCSS?.()
);
}
if (!$("#resultReplay").hasClass("hidden")) {
@ -465,6 +468,8 @@ export async function screenshot(): Promise<void> {
$(".highlightContainer").addClass("hidden");
if (revertCookie) $("#cookiePopupWrapper").addClass("hidden");
FunboxList.get(Config.funbox).forEach((f) => f.functions?.clearGlobal?.());
(document.querySelector("html") as HTMLElement).style.scrollBehavior = "auto";
window.scrollTo({
top: 0,