Skip to main content

contain_wheel

Function contain_wheel 

Source
pub fn contain_wheel<E: InteractiveElement>(el: E, axes: Axes) -> E
Expand description

Keep every wheel inside the pane it landed on — overscroll-behavior: contain, where claim_wheel is the chaining kind.

For a box with a cap on it, where the content is a program’s output rather than a document: it is a window onto something, and a wheel over a window belongs to what is inside it. Chaining asks the pane to prove it moved, which it reads off a handle carrying the previous frame’s layout — under a pane whose content is still arriving that reads as “did not move”, and the page takes the wheel while the box is still scrolling (user report, DEV-13).

The page is still reachable: move the pointer off the box.