Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(styles): fix focus indicator visibility for links in accordion items inside the footer on mobile #4306

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
8 changes: 7 additions & 1 deletion packages/components/src/animations/collapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ export const expand = (el: HTMLElement): Animation => {
const expandedKeyframe: Keyframe = { height: `${el.scrollHeight}px`, offset: 1 };
const finalKeyframe: Keyframe = { height: 'auto' };

return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);
const animation = el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);

animation.addEventListener('finish', () => {
el.style.overflow = 'visible';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just add the overflow property to the final keyframe?

});

return animation;
};
Loading