Prevent layout thrashing by status text
parent
75480b5bf4
commit
aaa7c02b5c
|
@ -1335,7 +1335,11 @@ export default function( revealElement, options ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce the current slide contents to screen readers
|
// Announce the current slide contents to screen readers
|
||||||
|
// Use animation frame to prevent getComputedStyle in getStatusText
|
||||||
|
// from triggering layout mid-frame
|
||||||
|
requestAnimationFrame( function() {
|
||||||
announceStatus( getStatusText( currentSlide ) );
|
announceStatus( getStatusText( currentSlide ) );
|
||||||
|
});
|
||||||
|
|
||||||
progress.update();
|
progress.update();
|
||||||
controls.update();
|
controls.update();
|
||||||
|
|
Loading…
Reference in New Issue