fix: close phase 2 journey blockers
This commit is contained in:
@@ -121,7 +121,10 @@ export function createSceneController(options: SceneControllerOptions): SceneCon
|
||||
rootResources.releaseAnimationFrame(frameId);
|
||||
if (overlay !== 'active' || machine.snapshot().kind !== 'running' || !current) return;
|
||||
try {
|
||||
const frameStartedAt = scheduler.now();
|
||||
current.runtime.render(latestJourney, now);
|
||||
const frameEndedAt = scheduler.now();
|
||||
options.onFrameRendered?.(frameStartedAt, frameEndedAt);
|
||||
} catch {
|
||||
enterStatic('render-failure');
|
||||
return;
|
||||
@@ -332,7 +335,7 @@ export function createSceneController(options: SceneControllerOptions): SceneCon
|
||||
pauseReason = 'freeze';
|
||||
break;
|
||||
case 'paused':
|
||||
pauseReason = 'freeze';
|
||||
if (pauseReason !== 'visitor') pauseReason = 'freeze';
|
||||
break;
|
||||
case 'lost':
|
||||
clearRestoreWatchdog();
|
||||
@@ -351,11 +354,17 @@ export function createSceneController(options: SceneControllerOptions): SceneCon
|
||||
const persisted = Boolean((event as Event & { persisted?: boolean }).persisted);
|
||||
if (!persisted || overlay !== 'frozen') return;
|
||||
overlay = 'active';
|
||||
const lifecycle = machine.snapshot();
|
||||
if (!(options.motionAllowed?.() ?? true)) {
|
||||
if (
|
||||
lifecycle.kind === 'paused'
|
||||
&& current !== null
|
||||
&& !lifecycle.resumeNeedsLoad
|
||||
&& pauseReason === 'visitor'
|
||||
) return;
|
||||
enterStatic('motion-disallowed');
|
||||
return;
|
||||
}
|
||||
const lifecycle = machine.snapshot();
|
||||
if (page.visibilityState !== 'visible') return;
|
||||
if (lifecycle.kind === 'paused' && pauseReason === 'freeze') {
|
||||
pauseReason = null;
|
||||
|
||||
Reference in New Issue
Block a user