Skip to content

Commit 466335f

Browse files
committed
fix(ebay-carousel): fix width calculation for last pill when font not loaded (#2344)
1 parent cb1179d commit 466335f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/ebay-carousel/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</span>
88
</h1>
99

10-
Descrete or Continuious carousel component. Can show items as a slide or various widths.
10+
Discrete or Continuous carousel component. Can show items as a slide or various widths.
1111

1212
## Examples and Documentation
1313

@@ -22,4 +22,4 @@ In order to preserve the tabindex on an item, pass `data-carousel-tabindex="-1"`
2222

2323
## Reduced motion
2424

25-
The carousel doesnot autoplay by respecting the `prefers-reduced-motion` media query. Toggle your reduced motion settings to view autoplay example with the default behavior and reduced motion behavior.
25+
The carousel does not autoplay by respecting the `prefers-reduced-motion` media query. Toggle your reduced motion settings to view autoplay example with the default behavior and reduced motion behavior.

src/components/ebay-carousel/component.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ class Carousel extends Marko.Component<Input, State> {
531531
if (!config.scrollTransitioning) {
532532
this.handleScroll(this.listEl.scrollLeft);
533533
}
534-
}),
534+
})
535535
);
536536
} else {
537537
this.subscribeTo(this.listEl).on("transitionend", ({ target }) => {
@@ -541,7 +541,11 @@ class Carousel extends Marko.Component<Input, State> {
541541
});
542542
}
543543

544-
this.onRenderLegacy();
544+
document.fonts.ready.then(() => {
545+
this.cleanupAsync();
546+
this.onRenderLegacy();
547+
});
548+
545549
}
546550

547551
onUpdate() {

0 commit comments

Comments
 (0)