From 69468d88c0d9cfd8af8ba365ccd8f8b3150501ae Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 31 Mar 2022 22:56:33 -0500 Subject: [PATCH] Update bounding rects when fonts have loaded in This fixes the issue with everything shifting slightly once they load, invalidating all the bounding rects until they are next updated --- src/components/layout/Sticky.vue | 1 + src/features/links/Links.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/layout/Sticky.vue b/src/components/layout/Sticky.vue index f4d79af..5413d36 100644 --- a/src/components/layout/Sticky.vue +++ b/src/components/layout/Sticky.vue @@ -29,6 +29,7 @@ function updateTop() { } nextTick(updateTop); +document.fonts.ready.then(updateTop); onMounted(() => { const el = element.value?.parentElement; diff --git a/src/features/links/Links.vue b/src/features/links/Links.vue index 1f821c8..a5877b5 100644 --- a/src/features/links/Links.vue +++ b/src/features/links/Links.vue @@ -50,6 +50,7 @@ function updateNodes() { }); } } +document.fonts.ready.then(updateNodes); const validLinks = computed(() => { const n = nodes.value;