diff --git a/src/components/right/statistics/MessageStatistics.tsx b/src/components/right/statistics/MessageStatistics.tsx index e289d60b5..cbff5cef4 100644 --- a/src/components/right/statistics/MessageStatistics.tsx +++ b/src/components/right/statistics/MessageStatistics.tsx @@ -178,7 +178,7 @@ function MessageStatistics({ {(!loadedChartsRef.current.size || !statistics.publicForwardsData) && } -
+
{GRAPHS.map((graph) => { const isGraphReady = loadedChartsRef.current.has(graph) && !errorChartsRef.current.has(graph); return ( diff --git a/src/components/right/statistics/MonetizationStatistics.tsx b/src/components/right/statistics/MonetizationStatistics.tsx index 29ec03d91..b91af5f7b 100644 --- a/src/components/right/statistics/MonetizationStatistics.tsx +++ b/src/components/right/statistics/MonetizationStatistics.tsx @@ -245,7 +245,7 @@ const MonetizationStatistics = ({ {!loadedChartsRef.current.size && } -
+
{MONETIZATION_GRAPHS.filter(Boolean).map((graph) => (
))} diff --git a/src/components/right/statistics/Statistics.tsx b/src/components/right/statistics/Statistics.tsx index 111ee5c6f..24fa78c9e 100644 --- a/src/components/right/statistics/Statistics.tsx +++ b/src/components/right/statistics/Statistics.tsx @@ -209,7 +209,7 @@ const Statistics = ({ {!loadedChartsRef.current.size && } -
+
{graphs.map((graph) => { const isGraphReady = loadedChartsRef.current.has(graph) && !errorChartsRef.current.has(graph); return ( diff --git a/src/components/right/statistics/StoryStatistics.tsx b/src/components/right/statistics/StoryStatistics.tsx index 84248ac9f..db72d7c59 100644 --- a/src/components/right/statistics/StoryStatistics.tsx +++ b/src/components/right/statistics/StoryStatistics.tsx @@ -183,7 +183,7 @@ function StoryStatistics({ {!loadedChartsRef.current.size && } -
+
{GRAPHS.map((graph) => { const isGraphReady = loadedChartsRef.current.has(graph) && !errorChartsRef.current.has(graph); return ( diff --git a/src/lib/fasterdom/stricterdom.ts b/src/lib/fasterdom/stricterdom.ts index b04e4e3eb..23e116cad 100644 --- a/src/lib/fasterdom/stricterdom.ts +++ b/src/lib/fasterdom/stricterdom.ts @@ -54,6 +54,7 @@ export function forceMeasure(cb: () => any) { } const forcedMutationAllowedFor = new Set(); +const IGNORE_SUBTREE_ATTR = 'data-stricterdom-ignore'; export function forceMutation(cb: () => any, nodes: Node | Node[]) { if (phase !== 'measure') { @@ -167,6 +168,11 @@ function setupMutationObserver() { return; } + const targetElement = target instanceof Element ? target : target.parentElement; + if (targetElement?.closest(`[${IGNORE_SUBTREE_ATTR}]`)) { + return; + } + if (type === 'childList' && target instanceof HTMLElement && target.contentEditable) { return; }