From eb37b2dff069170b51063553a45f88e1c9496600 Mon Sep 17 00:00:00 2001 From: Wendy Yuchen Sun Date: Mon, 22 Jun 2026 13:12:47 +0800 Subject: [PATCH 1/2] fix: preview area same height as edit area --- src/pages/home/home.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/home.js b/src/pages/home/home.js index d6d5495..640c04a 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -382,7 +382,7 @@ export default function Home() { {/* Right side output panel */} -
+

{t('preview')}

@@ -413,7 +413,7 @@ export default function Home() {
Date: Mon, 22 Jun 2026 13:44:01 +0800 Subject: [PATCH 2/2] fix(home): app-shell layout so only panes scroll, not the page Pin the editor/preview area to viewport height and let each pane scroll internally instead of growing the document: - Wrap Home in a flex-column app shell (lg:h-screen lg:overflow-hidden) with main as flex-1, so panes fill viewport-minus-header without a hard-coded height. - Make editor box and preview box flex-1 + min-h-0 so they scroll internally; preview box matches editor box height. - Give preview box `relative` so see-mark's absolutely-positioned .sr-only MathML spans clip here instead of resolving against the viewport and adding phantom page scroll. - EditIconsTab fills its container (h-full) and adds min-h-0 on flex ancestors so the category/template lists scroll to the last item instead of overflowing. --- src/components/edit-icons-tab.js | 9 +++++---- src/pages/home/home.js | 17 ++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/components/edit-icons-tab.js b/src/components/edit-icons-tab.js index 3746ac1..6737458 100644 --- a/src/components/edit-icons-tab.js +++ b/src/components/edit-icons-tab.js @@ -79,7 +79,7 @@ const EditIconsTab = ({ insertLatex, addImageToExport }) => { as="div" selectedIndex={selectedMainTabIndex} onChange={setSelectedMainTabIndex} - className="flex flex-col w-full h-[600px] border-r border-border-main" + className="flex flex-col w-full h-full border-r border-border-main" > {mainTabList.map(({ id }, index) => ( @@ -94,7 +94,7 @@ const EditIconsTab = ({ insertLatex, addImageToExport }) => { ))} - + { as="div" className="flex flex-col px-2 py-3 gap-2 border-r border-border-main" style={{ - maxHeight: '562px', + maxHeight: '100%', + minHeight: 0, overflowY: 'auto', scrollbarWidth: 'none', // hide scrollbar in Firefox msOverflowStyle: 'none', // hide scrollbar in IE/Edge @@ -130,7 +131,7 @@ const EditIconsTab = ({ insertLatex, addImageToExport }) => { ))} - + {mathTabList.map((mathTab) => { return ( diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 640c04a..5f25e52 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -315,16 +315,16 @@ export default function Home() { } return ( - <> +
setShowSettingModal(true)} title={displayConfig.title} onTitleChange={(title) => setDisplayConfig({ title })} /> -
+
{/* Left side input panel */} -
+

{t('editContent')}

@@ -361,7 +361,7 @@ export default function Home() {
-
+
@@ -382,7 +382,7 @@ export default function Home() {
{/* Right side output panel */} -
+

{t('preview')}

@@ -412,8 +412,11 @@ export default function Home() { />
+ {/* `relative` makes this the containing block for the absolutely-positioned + `.sr-only` MathML spans see-mark emits, so they're clipped here instead of + resolving against the viewport and adding phantom page scroll. */}
- +
); }