Skip to content

Commit b649bb8

Browse files
Merge pull request #110 from Travelopia/fix/image-height-issue
Added Set time out for update height function.
2 parents 34e3854 + db87897 commit b649bb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/slider/tp-slider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ export class TPSliderElement extends HTMLElement {
319319
}
320320

321321
// First, update the height.
322-
this.updateHeight();
322+
323+
// Yield to main thread to fix a bug in Safari 16.
324+
setTimeout( () => this.updateHeight(), 0 );
323325

324326
// Now lets slide!
325327
const behaviour: string = this.getAttribute( 'behaviour' ) || '';

0 commit comments

Comments
 (0)