From 7e2386bcdf0545778bd29db10b056470b41315e1 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Sun, 1 Feb 2026 23:51:53 +0000 Subject: [PATCH] fix(dees-service-lib-loader): prevent horizontal scrollbar by offsetting xterm WidthCache measurement container --- changelog.md | 7 +++++++ ts_web/00_commitinfo_data.ts | 2 +- ts_web/services/DeesServiceLibLoader.ts | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 200bccc..ec6fa9e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2026-02-01 - 3.41.5 - fix(dees-service-lib-loader) +prevent horizontal scrollbar by offsetting xterm WidthCache measurement container + +- Injects additional CSS into DeesServiceLibLoader to move xterm.js WidthCache measurement div off-screen horizontally (selector: body > div[style*="top: -50000px"][style*="width: 50000px"]) +- Fixes root cause where xterm creates a large-width measurement container (width: 50000px) on document.body that expands scrollWidth and causes a horizontal scrollbar +- Change applied in ts_web/services/DeesServiceLibLoader.ts by concatenating the fix CSS into the injected stylesheet + ## 2026-01-29 - 3.41.4 - fix() no changes diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index fa6ac4e..0cffa14 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@design.estate/dees-catalog', - version: '3.41.4', + version: '3.41.5', description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.' } diff --git a/ts_web/services/DeesServiceLibLoader.ts b/ts_web/services/DeesServiceLibLoader.ts index 94c1295..06b100b 100644 --- a/ts_web/services/DeesServiceLibLoader.ts +++ b/ts_web/services/DeesServiceLibLoader.ts @@ -193,9 +193,20 @@ export class DeesServiceLibLoader { const response = await fetch(cssUrl); const cssText = await response.text(); + // Fix for xterm.js WidthCache measurement container causing horizontal scrollbar + // xterm.js creates this on document.body with width: 50000px, top: -50000px + // Moving it off-screen horizontally prevents scrollWidth expansion + const xtermMeasurementFix = ` +/* Fix xterm.js WidthCache measurement container causing horizontal scrollbar */ +/* xterm creates this on document.body - move it off-screen horizontally too */ +body > div[style*="top: -50000px"][style*="width: 50000px"] { + left: -50000px !important; +} +`; + const style = document.createElement('style'); style.id = styleId; - style.textContent = cssText; + style.textContent = cssText + xtermMeasurementFix; document.head.appendChild(style); }