Skip to main content

ScrollIntoFocusController

Purpose​

For elements that demand the user's attention, scroll an element into the view as it appears.

This controller is ephemeral, once it has performed its duty it will remove itself and all its values from the element.

Actions​

ActionPurpose
--

Targets​

TargetPurposeDefault
---

Classes​

ClassPurposeDefault
---

Values​

See scrollIntoView documentation for possible values.

Note: If the user's browser does not support smooth scrolling, the browser will ignore these values and scroll using the browser default.

ValueTypeDescriptionDefault
behaviourStringOne of auto, smoothauto
blockStringOne of center, end, nearest, startstart
inlineStringOne of center, end, nearest, startnearest

Events​

EventWhenDispatched onevent.detail
----

Side Effects​

None

How to Use​

See Also​

Scroll Container Controller Scroll To Controller Scroll To Top Controller Scroll To Bottom Controller Scroll Into Focus Controller