Skip to content

Commit db87897

Browse files
committed
Changed structure of set timeout.
Signed-off-by: roshniahuja <[email protected]>
1 parent 83a7285 commit db87897

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/slider/tp-slider.ts

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

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

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

0 commit comments

Comments
 (0)