Skip to content

Commit

Permalink
Merge pull request #2330 from framer/fix/safari-resync
Browse files Browse the repository at this point in the history
Attempting fix for animation handover in Safari
  • Loading branch information
mergetron[bot] committed Sep 5, 2023
2 parents fa58092 + ffe8518 commit e4eefa4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ export function createAcceleratedAnimation(
* For synching handoff animations with the new Motion animation we want
* to ensure startTime is synchronously set.
*/
if (options.syncStart) {
if (options.syncStart && document.timeline) {
animation.startTime = frameData.isProcessing
? frameData.timestamp
: performance.now()
: document.timeline.currentTime
}

const cancelAnimation = () => animation.cancel()
Expand Down

0 comments on commit e4eefa4

Please sign in to comment.