From 340b9757c31e629c00735b6fccddcda4376570bc Mon Sep 17 00:00:00 2001 From: zsviczian Date: Tue, 7 Mar 2023 09:54:50 +0100 Subject: [PATCH] Update textWysiwyg.tsx --- src/element/textWysiwyg.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index 16bc1ccae..a3d970018 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -11,7 +11,7 @@ import { isBoundToContainer, isTextElement, } from "./typeChecks"; -import { CLASSES, isFirefox, isSafari, VERTICAL_ALIGN } from "../constants"; +import { CLASSES, VERTICAL_ALIGN } from "../constants"; import { ExcalidrawElement, ExcalidrawLinearElement, @@ -347,13 +347,10 @@ export const textWysiwyg = ({ boxSizing: "content-box", }); - //As Firefox, Safari needs little higher dimensions on DOM - const magicOffset = - isFirefox || isSafari - ? (excalidrawContainer - ? parseFloat(getComputedStyle(excalidrawContainer).fontSize) - : 16) / 16 - : 0; + const magicOffset = + (excalidrawContainer + ? parseFloat(getComputedStyle(excalidrawContainer).fontSize) + : 16) / 16; const onEditableInput = () => { const updatedTextElement = Scene.getScene(element)?.getElement(