Skip to content

fix: save serial panel height before expand, restore on collapse#68

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

fix: save serial panel height before expand, restore on collapse#68
zevorn merged 1 commit intomainfrom
fix/serial-expand-save-restore

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 18, 2026

Save `panel.offsetHeight` before adding the expanded class (when the height is correct). On collapse, restore that saved value directly. No rAF, no DOM re-reading race.

Record panel.offsetHeight right before expanding (when it has the
correct grid-aligned size).  On collapse, restore that exact value.
No DOM re-reading after class toggle, no requestAnimationFrame.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn merged commit 5f1ed79 into main Mar 18, 2026
1 check passed
@zevorn zevorn deleted the fix/serial-expand-save-restore 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