fix(parallax): prime parallax position with pre-Blazor init script to kill Server->WASM position pop
This commit is contained in:
@@ -141,6 +141,14 @@ export function register(element: HTMLElement, options: RegisterOptions): string
|
||||
|
||||
setupAutoHeight(handle);
|
||||
|
||||
// Prime position synchronously so enhanced navigation and WASM handoff have
|
||||
// zero-frame gap. The init script covers cold page load; this covers nav.
|
||||
// Skip under reduced motion — parallax.ts never drives position then.
|
||||
if (!reducedMotion()) {
|
||||
element.setAttribute('data-parallax-active', '');
|
||||
applyParallax(handle);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user