← All Pull Requests

adom-3d: no inner scrollbar in the wiki frame #4

Merged opened by John Lauer 2026-10-11

In the wiki's widget frame the loaded viewer showed a thin inner scrollbar. Inside a frame the widget now drops the default body margin and hides document overflow, so nothing the viewer adds can scroll the frame. Standalone pages are unchanged.

🤖 Generated with Claude Code

Diff Skip to comments

--- a/widgets/model-3d-widget.js+++ b/widgets/model-3d-widget.js@@ -1,126 +1,129 @@⋯ 52 unchanged lines ⋯     connectedCallback() {       if (this._init) return; this._init = true;       this.attachShadow({ mode: 'open' });+      // in a wiki frame: no page margin, and nothing the viewer adds (its tip bubble) may give the frame a scrollbar+      if (window.self !== window.top) { document.documentElement.style.overflow = 'hidden'; document.body.style.margin = '0'; }       this._src = this.getAttribute('src');       this._poster = this.getAttribute('poster');       this._idle();⋯ 65 unchanged lines ⋯   }   if (!customElements.get('adom-3d')) customElements.define('adom-3d', Adom3D); })();+

Comments

No comments yet.

Log in to comment.