From 9ecce8dfda3f1048d2cdb6f30aadd4fb6cd38f16 Mon Sep 17 00:00:00 2001 From: shallowmallow Date: Sun, 20 Oct 2024 10:04:54 +0200 Subject: [PATCH] Use correct font computed style for div text measurer --- haxe/ui/backend/TextInputImpl.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/haxe/ui/backend/TextInputImpl.hx b/haxe/ui/backend/TextInputImpl.hx index 2306c19..5d60980 100644 --- a/haxe/ui/backend/TextInputImpl.hx +++ b/haxe/ui/backend/TextInputImpl.hx @@ -320,6 +320,7 @@ class TextInputImpl extends TextDisplayImpl { div.style.lineHeight = element.style.lineHeight; if ((element is TextAreaElement)) { div.style.wordBreak = element.style.wordBreak; + div.style.font = Browser.window.getComputedStyle(element).font; } if (autoWidth == false) { div.style.width = (_width > 0) ? '${HtmlUtils.px(_width)}' : "";