From 000d88851ee5179763fcc382314ab6f3b75138b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Tainon?= Date: Wed, 5 Nov 2025 16:38:36 +0100 Subject: [PATCH] [Fix] Use latex and zone layout scroll icon --- frontend/task/layout/ZoneLayout.tsx | 8 +++++--- frontend/task/libs/quickalgo_library_factory.ts | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/task/layout/ZoneLayout.tsx b/frontend/task/layout/ZoneLayout.tsx index 461de99dc..7aa8d4933 100644 --- a/frontend/task/layout/ZoneLayout.tsx +++ b/frontend/task/layout/ZoneLayout.tsx @@ -24,9 +24,11 @@ export function ZoneLayout(props: ZoneLayoutProps) { } const onScrollZoneLayout = useCallback(() => { - const el = zoneLayoutRef.current; - const isBottom = el.scrollHeight - el.scrollTop <= el.clientHeight + 1; - setIsBottom(isBottom); + setTimeout(() => { + const el = zoneLayoutRef.current; + const isBottom = el.scrollHeight - el.scrollTop <= el.clientHeight + 1; + setIsBottom(isBottom); + }); }, []); const {} = useResizeDetector({ diff --git a/frontend/task/libs/quickalgo_library_factory.ts b/frontend/task/libs/quickalgo_library_factory.ts index e8bdda93e..c190a2430 100644 --- a/frontend/task/libs/quickalgo_library_factory.ts +++ b/frontend/task/libs/quickalgo_library_factory.ts @@ -82,7 +82,10 @@ export function* createQuickalgoLibrary(platformAlreadyChanged: boolean = false) } } - yield* call(loadMathJax); + if (currentTask?.useLatex) { + yield* call(loadMathJax); + } + yield* call(loadFonts, state.options.theme, currentTask); // Reset fully local strings when creating a new context to avoid keeping strings from an other language