demo ยท v144

Popup Overlay

The blue popup has overscroll-behavior:contain but fits its content — before v144 the rule did nothing because the element wasn't actually scrollable. Now it stops scroll chaining anyway. Touch / wheel over the blue area; the outer scrollable shouldn't move.

overscroll-behavior on non-scrollable: Chrome 144+

Use the trackpad or touch to scroll over the blue popup. The grey background article should NOT move.

Outer scrollable article. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident.

Sunt in culpa qui officia deserunt mollit anim id est laborum.

the API

.popup {
  overscroll-behavior: contain;
  /* v144: this works even when .popup has no overflow.
     Pre-v144 a non-scrollable element ignored the property
     and chained to its ancestor. */
}

see also

scenario focus

Select a scenario to focus its rendered example and summary.