Skip to content

Commit

Permalink
fix: accordion scrolls direct scrollable parent only
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Dec 14, 2022
1 parent 2cbf6d3 commit 9941d4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/core/accordion.js
Expand Up @@ -189,7 +189,7 @@ async function transition(el, show, { content, duration, velocity, transition })
}

function keepScrollPosition(el) {
const scrollParent = scrollParents(el)[0];
const [scrollParent] = scrollParents(el, /auto|scroll/, true);
let frame;
(function scroll() {
frame = requestAnimationFrame(() => {
Expand Down

0 comments on commit 9941d4b

Please sign in to comment.