Skip to content

Commit

Permalink
chore: test for that method first of all
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke committed Jan 30, 2022
1 parent a3522d1 commit 795546f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/uikit-workshop/src/scripts/components/modal-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,13 @@ export const modalViewer = {
if (i + 1 === pos) {
els[i].classList.add('pl-is-active');

patternInfoPanelElem.scroll({
top: els[i].offsetTop - 14,
behavior: 'smooth',
});
// Scroll to the related entry withtin the pattern info panel
if (patternInfoElem.scroll) {
patternInfoElem.scroll({
top: els[i].offsetTop - 14,
behavior: 'smooth',
});
}
}
}
},
Expand Down

0 comments on commit 795546f

Please # to comment.