mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
fix(result page): cannot take screenshot if crt funbox is active (fehmer) (#4755)
This commit is contained in:
parent
59d3749449
commit
64f49154b5
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue