fix: smooth advanced focus entrance

This commit is contained in:
Thomas Camlong committed 2026-08-09 18:06:26 +02:00
1 parent 00688d5c1a
commit 6f1c81bc04
4 files changed
+135 -20

No files matched your search

@@ -0,0 +1,13 @@
export const startAdvancedFocusEntrance = (
portalTarget: HTMLElement,
host: HTMLElement,
surface: HTMLElement,
readyClass: string,
) => {
host.append(portalTarget);
surface.classList.remove(readyClass);
return requestAnimationFrame(() => {
if (surface.isConnected) surface.classList.add(readyClass);
});
};