When expanding an accordion, align the top with the top of page

Created on 29 January 2023, about 2 years ago
Updated 30 January 2023, about 2 years ago

This module works very well in most cases. But the current behavior doesn't consistently account or allow for positioning the top of a newly opened accordion with the top of the visible viewport/display.

The current behavior can be jarring when someone has a preceding (higher up) accordion expanded, then opens a lower one and the new accordion's top is scrolled well above the display so the user has to scroll up to read. This is because the one above collapsed, pulling the content up and out of view.

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @w01f
  • πŸ‡ΊπŸ‡ΈUnited States w01f

    Just following up I've looked into this a bit more and I think a small js snippet could align the tops of newly opened accordions with the top of the page and add a smooth adjust/scroll behavior. I'm hoping to have some time to look into this further.

Production build 0.71.5 2024