From 4daf1d4bef9edf93cd9bb1f404bd022472ff17a2 Mon Sep 17 00:00:00 2001 From: Rafael Wendel Date: Fri, 30 Oct 2020 14:54:39 -0300 Subject: [PATCH] added pos absolute to fix percy --- client/app/lib/calculateTextWidth.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/app/lib/calculateTextWidth.ts b/client/app/lib/calculateTextWidth.ts index 55e7b2709f..2b28a5dea0 100644 --- a/client/app/lib/calculateTextWidth.ts +++ b/client/app/lib/calculateTextWidth.ts @@ -1,5 +1,8 @@ const canvas = document.createElement("canvas"); canvas.style.display = "none"; +canvas.style.position = "absolute"; +canvas.style.top = "0"; +canvas.style.left = "0"; document.body.appendChild(canvas); export function calculateTextWidth(text: string, container = document.body) {