Spec-Zone.ru › htmx

htmx.config.defaultFocusScroll

Scrolls to focused element after swap

The htmx.config.defaultFocusScroll option, when set to true, causes htmx to scroll the focused element into view after each swap.

Default: false

Example

htmx.config.defaultFocusScroll = true;
<meta name="htmx-config" content='{"defaultFocusScroll":true}'>

Useful when swapping content that moves focus to a new element and you want the user’s view to follow.

See also: htmx.config

Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/config/htmx-config-defaultFocusScroll/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API