diff --git a/src/ui/kit/UiPanelEdge.vue b/src/ui/kit/UiPanelEdge.vue index 5827e914f..bb1ec1f9c 100644 --- a/src/ui/kit/UiPanelEdge.vue +++ b/src/ui/kit/UiPanelEdge.vue @@ -15,10 +15,19 @@ function toggle() { function sync() { side.value = panelSide(button.value); } -onMounted(sync); -const icon = computed(() => (side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left')); +// The layout moves some panels to the right column after they mount, so the +// side is read again once that has happened. +onMounted(() => { + sync(); + globalThis.requestAnimationFrame?.(sync); +}); +const icon = computed(() => + side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left', +); const label = computed(() => - on.value ? t('Move panels back beside the rail') : t('Move panels over the rail, to the edge'), + on.value + ? t('Move panels back beside the rail') + : t('Move panels over the rail, to the edge'), ); @@ -26,7 +35,7 @@ const label = computed(() =>