The up.viewport
module controls the scroll position and focus within scrollable containers ("viewports").
The default viewport for any web application is the main document. An application may
define additional viewports by giving the CSS property { overflow-y: scroll }
to any <div>
.
Also see documentation for the scroll option and focus option.
Scrolls the given element's viewport so the first rows of the element are visible for the user.
Marks this element as being fixed to the top edge of the screen
using position: fixed
.
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.
Scrolls the given element's viewport so the first rows of the element are visible for the user.
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 scroll positions of viewports
viewports configured in up.viewport.config.viewportSelectors
.
Return the scrolling element for the browser's main content area.
Saves the top scroll positions of all viewports in the current layer.