Skip to content

Commit

Permalink
fix(result page): cannot take screenshot if crt funbox is active (feh…
Browse files Browse the repository at this point in the history
…mer) (#4755)
  • Loading branch information
fehmer committed Nov 3, 2023
1 parent 59d3749 commit 64f4915
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/ts/test/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 64f4915

Please sign in to comment.