From 60e3801691decef03399f9d3012b9032fb39cf20 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Thu, 12 Sep 2024 13:42:39 +0200 Subject: [PATCH] fix: WYSIWYG editor padding is not normalized with zoom.value (#8481) --- packages/excalidraw/element/textWysiwyg.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/excalidraw/element/textWysiwyg.tsx b/packages/excalidraw/element/textWysiwyg.tsx index 2281a0cc3..23778cb7b 100644 --- a/packages/excalidraw/element/textWysiwyg.tsx +++ b/packages/excalidraw/element/textWysiwyg.tsx @@ -247,7 +247,7 @@ export const textWysiwyg = ({ // adding left and right padding buffer, so that browser does not cut the glyphs (does not work in Safari) const padding = !isSafari - ? Math.ceil(updatedTextElement.fontSize / 2) + ? Math.ceil(updatedTextElement.fontSize / appState.zoom.value / 2) : 0; // Make sure text editor height doesn't go beyond viewport