Scroll-Away Detection (IntersectionObserver)

When a menu is open and you scroll the trigger off-screen, the menu automatically closes. This prevents "floating orphan" menus that detach from their triggers.

Scroll down to find the triggers...

Trigger Zone

Click a link to open its menu, then scroll this page. When the trigger leaves the viewport, the menu will close automatically.

Try bridges, coffee spots, or parks.

Web components too: bridges, coffee spots.

Keep scrolling — the menu should have closed when the trigger left the viewport.

Second Trigger Zone

The observer is per-menu-open. Each time you click a trigger, a new observer is created. When the menu closes (for any reason), the observer is disconnected.

all locations

End of page.