Bug Description
When VSC injects its controller onto an <audio> element that lives inside a position: relative (or otherwise positioned) container, the controller's absolute top is set to the media element's document offset again on top of the offset already contributed by the positioned ancestor. The result is the controller landing at roughly 2× the media element's Y position, far below the actual page content. This inflates document.documentElement.scrollHeight and produces a large empty/scrollable white area below the page footer.
Steps to Reproduce
- Install VSC, open this public page in Chrome:
https://katanumahotori.com/blog/sorami-kohaku-interview
- The page contains two embedded podcast players, each rendered as an HTML5
<audio> element inside a position: relative card wrapper. The second one sits at about y = 26790px.
- Scroll to the bottom: there is ~24,000px of empty scrollable space below the footer.
Root cause (observed in DOM)
- Clean browser (no extensions):
document.documentElement.scrollHeight ≈ 25,763px, footer is the last element (gap below footer = 0).
- With VSC enabled:
scrollHeight ≈ 53,639px.
- The extra height is caused by a single VSC node:
<div id="controller" class="vsc-controller" style="top: 26789.9px; left: 616.6px; opacity: 0.3;"> whose rendered position (getBoundingClientRect().top + scrollY) is ≈ 53,608px — i.e. its CSS top (the audio's offset, 26,790px) is added on top of its positioned parent already at ~26,790px, doubling it.
- Only the second
<audio> (deeper in the page, inside the positioned wrapper) is affected. A media element near the top is fine.
Expected
The controller should be positioned relative to its media element (or appended in a way that doesn't double-count the offset), so it doesn't extend the document's scrollable height.
Environment
- VSC: 0.10.2
- Chrome on Windows 11
- Reproducible on the public URL above (no login required)
Bug Description
When VSC injects its controller onto an
<audio>element that lives inside aposition: relative(or otherwise positioned) container, the controller's absolutetopis set to the media element's document offset again on top of the offset already contributed by the positioned ancestor. The result is the controller landing at roughly 2× the media element's Y position, far below the actual page content. This inflatesdocument.documentElement.scrollHeightand produces a large empty/scrollable white area below the page footer.Steps to Reproduce
https://katanumahotori.com/blog/sorami-kohaku-interview<audio>element inside aposition: relativecard wrapper. The second one sits at abouty = 26790px.Root cause (observed in DOM)
document.documentElement.scrollHeight≈ 25,763px, footer is the last element (gap below footer = 0).scrollHeight≈ 53,639px.<div id="controller" class="vsc-controller" style="top: 26789.9px; left: 616.6px; opacity: 0.3;">whose rendered position (getBoundingClientRect().top + scrollY) is ≈ 53,608px — i.e. its CSStop(the audio's offset, 26,790px) is added on top of its positioned parent already at ~26,790px, doubling it.<audio>(deeper in the page, inside the positioned wrapper) is affected. A media element near the top is fine.Expected
The controller should be positioned relative to its media element (or appended in a way that doesn't double-count the offset), so it doesn't extend the document's scrollable height.
Environment