Skip to content

fix: serial panel expand/collapse restores correct height#65

Merged
zevorn merged 1 commit intomainfrom
fix/serial-expand-height
Mar 18, 2026
Merged

fix: serial panel expand/collapse restores correct height#65
zevorn merged 1 commit intomainfrom
fix/serial-expand-height

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 18, 2026

Collapsing from expanded read `offsetHeight` before browser reflowed, locking the fullscreen height.

Fix: clear inline height → toggle class → `requestAnimationFrame` → read and lock grid-computed height.

Collapsing from expanded state read offsetHeight before the browser
reflowed the non-expanded layout, locking in the fullscreen height.

Fix: clear inline height, toggle class, then use requestAnimationFrame
to read the grid-computed height after reflow and lock it.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn merged commit 0e1c543 into main Mar 18, 2026
1 check passed
@zevorn zevorn deleted the fix/serial-expand-height branch March 19, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant