Collapsing sibling scrolls up faq item

Created on 21 February 2024, 10 months ago

Problem/Motivation

When there's a faq item open and you open one underneath it,
The new item scrolls up because of the closed one.
In case of long faq items, this moves the newly opened faq off screen.
This issue is more obvious on mobile.

Steps to reproduce

  • Add multiple faq items with a lot of content text. (more than testing screen width.
  • Open the first faq item
  • Scroll down until the second faq header is almost on top of the page.
  • click the header of the second faq header
  • The faq is scrolled up

Proposed resolution

In case the sibling to close is in front of the one to open, scroll up the window with the height of the element to close.

Remaining tasks

test and review.

User interface changes

clicking a faq item keeps the heading at the same place where it was clicked.

🐛 Bug report
Status

Needs review

Version

6.1

Component

Code

Created by

🇧🇪Belgium samuhe

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

Comments & Activities

  • Issue created by @samuhe
  • 🇧🇪Belgium samuhe

    A first patch.
    There sometimes is a small stutter because of the animations not being 100% synced.
    Not sure if someone knows of an elegant way to solve it.

Production build 0.71.5 2024