The up.viewport
module controls scrolling
and focus within scrollable containers ("viewports").
The default viewport for any web application is the
document's scrolling element.
An application may define additional viewports by giving the CSS property { overflow-y: scroll }
to any block element.
Marks this element as a scrolling container ("viewport").
Marks this element as being fixed to the top edge of the screen
using position: fixed
.
Scrolls the given element's viewport so the first rows of the element are visible for the user.
Marks this element as being anchored to the right edge of the screen, typically fixed navigation bars.
Marks this element as being fixed to the bottom edge of the screen
using position: fixed
.
Marks this element as being fixed to the top edge of the screen
using position: fixed
.
Focuses the given element.
This class is assigned to elements that were focused by Unpoly but should not have a visible focus ring.
This class is assigned to elements that were focused by Unpoly and should have a visible focus ring.
Scrolls the given element's viewport so the first rows of the element are visible for the user.
Scrolls the given viewport to the given Y-position.
This class is assigned to the <body>
and right-anchored
elements while an overlay with a scrolling viewport is open.
Marks this element as a scrolling container ("viewport").
Returns the scrolling container for the given element.
Configures defaults for scrolling.
Returns the scrolling container for the given element.
Restores previously saved focus-related state.
Restores previously saved scroll positions.
Return the scrolling element for the browser's main content area.
Saves focus-related state for later restoration.
Saves scroll positions for later restoration.