From a1d86d120fa046eabdfc0fc1a674e34aebdc81f1 Mon Sep 17 00:00:00 2001 From: Marrrrrrrrry <34876935+Marrrrrrrrry@users.noreply.github.com> Date: Mon, 12 Oct 2026 23:41:10 +0800 Subject: [PATCH] refactor(ui): measure y-axis labels via textContent instead of innerHTML (#2536) --- internal/site/src/components/charts/hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/site/src/components/charts/hooks.ts b/internal/site/src/components/charts/hooks.ts index 0a99eaa23..c97610f15 100644 --- a/internal/site/src/components/charts/hooks.ts +++ b/internal/site/src/components/charts/hooks.ts @@ -103,7 +103,7 @@ export function useYAxisWidth() { maxChars = str.length const div = document.createElement("div") div.className = "text-xs tabular-nums tracking-tighter table sr-only" - div.innerHTML = str + div.textContent = str clearTimeout(timeout) timeout = setTimeout(() => { document.body.appendChild(div)