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

update from upstream fork #30

Merged
merged 15 commits into from
Nov 19, 2024
Prev Previous commit
Next Next commit
fix(carousel): out of order slides when inside sl-resize-observer (sh…
…oelace-style#2260)

* fix: sync slides after complete initialization

* chore: leftover
  • Loading branch information
alenaksu authored Nov 12, 2024
commit 51473c608efdcd639613e553dd7dd8f842bb2181
4 changes: 2 additions & 2 deletions src/components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
@@ -381,10 +381,10 @@ export default class SlCarousel extends ShoelaceElement {
this.createClones();
}

this.synchronizeSlides();

// Because the DOM may be changed, restore the scroll position to the active slide
this.goToSlide(this.activeSlide, 'auto');

this.synchronizeSlides();
}

private createClones() {