fix: smooth advanced focus entrance

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:07:08 +02:00
1 parent 7c840bcfa0
commit a0f4a58386
3 files changed
+81

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);
});
};