From 5211052feabd07f9b56bd3836e9f56473094341f Mon Sep 17 00:00:00 2001 From: saleh Date: Wed, 11 Nov 2026 16:46:23 +0000 Subject: [PATCH] fix(layout): lock scrollWidth against plotly rtl tester svg overflow --- dashboards/tmall.html | 30 ++++++++++++++++++++++++++++++ tmall.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/dashboards/tmall.html b/dashboards/tmall.html index 5833490..70ba720 100644 --- a/dashboards/tmall.html +++ b/dashboards/tmall.html @@ -97,6 +97,19 @@ font-weight: 700; background-color: #FFF1F2; } + + /* Fix Plotly RTL SVG Tester overflow */ + #js-plotly-tester { + left: 0 !important; + top: 0 !important; + position: fixed !important; + opacity: 0 !important; + pointer-events: none !important; + width: 1px !important; + height: 1px !important; + z-index: -9999 !important; + } + @@ -3578,6 +3591,23 @@ }); + + // Prevent Plotly RTL tester svg from expanding scrollWidth + const plotlyFixObserver = new MutationObserver(() => { + const el = document.getElementById("js-plotly-tester"); + if (el) { + el.style.setProperty("left", "0", "important"); + el.style.setProperty("top", "0", "important"); + el.style.setProperty("position", "fixed", "important"); + el.style.setProperty("opacity", "0", "important"); + el.style.setProperty("pointer-events", "none", "important"); + el.style.setProperty("width", "1px", "important"); + el.style.setProperty("height", "1px", "important"); + el.style.setProperty("z-index", "-9999", "important"); + } + }); + plotlyFixObserver.observe(document.documentElement, { childList: true, subtree: true }); + // --- DKMall Meetings v2 JS Logic --- let talkTimeChartInstance = null; diff --git a/tmall.html b/tmall.html index 5833490..70ba720 100644 --- a/tmall.html +++ b/tmall.html @@ -97,6 +97,19 @@ font-weight: 700; background-color: #FFF1F2; } + + /* Fix Plotly RTL SVG Tester overflow */ + #js-plotly-tester { + left: 0 !important; + top: 0 !important; + position: fixed !important; + opacity: 0 !important; + pointer-events: none !important; + width: 1px !important; + height: 1px !important; + z-index: -9999 !important; + } + @@ -3578,6 +3591,23 @@ }); + + // Prevent Plotly RTL tester svg from expanding scrollWidth + const plotlyFixObserver = new MutationObserver(() => { + const el = document.getElementById("js-plotly-tester"); + if (el) { + el.style.setProperty("left", "0", "important"); + el.style.setProperty("top", "0", "important"); + el.style.setProperty("position", "fixed", "important"); + el.style.setProperty("opacity", "0", "important"); + el.style.setProperty("pointer-events", "none", "important"); + el.style.setProperty("width", "1px", "important"); + el.style.setProperty("height", "1px", "important"); + el.style.setProperty("z-index", "-9999", "important"); + } + }); + plotlyFixObserver.observe(document.documentElement, { childList: true, subtree: true }); + // --- DKMall Meetings v2 JS Logic --- let talkTimeChartInstance = null;