When opening the accordion, it does not scroll such that the bottom of the screen aligns with the bottom of the drawer so that we can see the content of the drawer without manually scrolling. Right now that behavior is happening when we close the drawer but it's not useful since the drawer is already closed.
Although there is a scroll event when we open or close the accordion, the scroll event is happening before or at the same time that the height of the accordion is changed so when we open it, it only scrolls to the bottom of the trigger section.
Desktop (please complete the following information):
OS: Windows
Browser Chrome, Edge (no scroll at all on Firefox so assuming it isn't supported yet)
Version 94, 94
Smartphone (please complete the following information):
Tested the auro-accordion on an iPhone6s with iOS 14 and there was no scroll functionality when a drawer is opened so assuming that it's not built for mobile devices.
Device: N/A
OS: N/A
Browser N/A
Version N/A
Additional context
An easy fix would be to add a timeout to scrollIntoView like
Describe the bug
When opening the accordion, it does not scroll such that the bottom of the screen aligns with the bottom of the drawer so that we can see the content of the drawer without manually scrolling. Right now that behavior is happening when we close the drawer but it's not useful since the drawer is already closed.
Although there is a scroll event when we open or close the accordion, the scroll event is happening before or at the same time that the height of the accordion is changed so when we open it, it only scrolls to the bottom of the trigger section.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When you open the drawer, the screen will scroll such that the whole drawer can be seen on the screen.
Screenshots
Video of the current behavior: https://user-images.githubusercontent.com/50314220/135501775-844ea3d9-2087-40d6-8daa-bafa97a02269.mp4
Desktop (please complete the following information):
Smartphone (please complete the following information):
Tested the
auro-accordion
on an iPhone6s with iOS 14 and there was no scroll functionality when a drawer is opened so assuming that it's not built for mobile devices.Additional context
An easy fix would be to add a timeout to
scrollIntoView
likeHowever, there may be a better solution since this scrolls after the drawer has been expanded, not while it is being expanded.