Repository navigation
Description
Summary
When a thread is at the bottom (stuck to the latest message), trackpad scrolling with the pointer over an inline-vis iframe does not scroll the chat. The chat snaps back to the bottom. Scrolling with the pointer over the text next to the iframe works. Only the bottom-most preview is affected, because the snap-back only happens while the timeline is attached to the bottom.
bb 0.48.0, Chrome.
Repro
- In a thread, have the agent's last message contain an
inline-vispage taller than the viewport, e.g. a couple of<img style="width:100%">figures. - Scroll to the bottom of the thread.
- Put the pointer over the iframe and scroll up with two fingers on a trackpad.
Expected: the chat scrolls up.
Actual: it stays at the bottom.
Reproduced in headless Chrome with mouse.wheel. Starting from the bottom (scrollTop 2687), I sent 30 small steps of deltaY: -8:
| Pointer position | scrollTop after |
|---|---|
| over the iframe | 2687 (stuck) |
| over text beside it | 2447 |
A single large step (deltaY: -150, like a mouse wheel notch) sometimes gets through. It jumps past bottomThresholdPx in one go, so trackpads are what's mostly affected.
Cause
The scroll position keeper (scroll-position-keeper-*.js) tells user scrolls apart from layout shifts by listening for wheel, touchstart, pointerdown and keydown on the scroll element. These events call extendInput() and start an input session.
With the pointer over the sandboxed inline-vis iframe, the browser routes the wheel events to the iframe's document. Scroll chaining still scrolls the parent timeline, but the parent never gets a wheel event. So handleScroll() sees a scroll with no input session while position.kind === "bottom". followsUnexplainedScroll() is false, so apply() treats it as unexplained and writes the scroll back to maxScrollTop.
Suggested fix
Forward wheel activity from the iframe to the host. The injected bootstrap script in inline-vis already sets up a postMessage bridge for links and height:
- In the iframe:
addEventListener("wheel", e => parent.postMessage({jsonrpc:"2.0", method:"…/wheel", params:{deltaY:e.deltaY}}, "*"), {passive:true}). Throttle it if needed. - In the host (
Meframe component): when that message comes from this iframe'scontentWindow, dispatch a syntheticnew WheelEvent("wheel", {bubbles:true, deltaY})on the iframe element. Or call the keeper's input-session hook directly.
I tested this by injecting the two halves into the running app. Afterwards, trackpad-style scrolling over the iframe behaved the same as over text (2687 → 2447).
A more general option: have the keeper treat any scroll that happens while the pointer is over an iframe inside the timeline as user input.
Activity
bb-slop-cop commentedon Oct 31, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui,inline-vis,confirmed-repro.Follow scrolls the timeline gets while the pointer is over an embedde…
Let trackpad scrolls over an inline preview leave the bottom of a thr…