Skip to content

Commit

Permalink
fix(result): word highlight element sometimes appearing on screenshot…
Browse files Browse the repository at this point in the history
…s (andGuo, Miodec) (#4739)

* fix: remove word history hover element on screenshot

* newline whoopsies

* also hiding highlight container

---------

Co-authored-by: Miodec <jack@monkeytype.com>
  • Loading branch information
andGuo and Miodec committed Oct 24, 2023
1 parent d2b7f41 commit fb5c8fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/ts/test/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ export async function screenshot(): Promise<void> {
$("#nocss").removeClass("hidden");
$("header, footer").removeClass("invisible");
$("#result").removeClass("noBalloons");
$(".wordInputHighlight").removeClass("hidden");
$(".highlightContainer").removeClass("hidden");
if (revertCookie) $("#cookiePopupWrapper").removeClass("hidden");
if (revealReplay) $("#resultReplay").removeClass("hidden");
if (!Auth?.currentUser) {
Expand Down Expand Up @@ -459,6 +461,8 @@ export async function screenshot(): Promise<void> {
$(".page.pageTest").prepend("<div class='screenshotSpacer'></div>");
$("header, footer").addClass("invisible");
$("#result").addClass("noBalloons");
$(".wordInputHighlight").addClass("hidden");
$(".highlightContainer").addClass("hidden");
if (revertCookie) $("#cookiePopupWrapper").addClass("hidden");

(document.querySelector("html") as HTMLElement).style.scrollBehavior = "auto";
Expand Down

0 comments on commit fb5c8fd

Please sign in to comment.