Skip to content

fix: TOC click in edit mode, memory leaks, scroll sync offset, and me…#62

Closed
resinya wants to merge 1 commit into
pd4d10:mainfrom
resinya:fix/toc-editor-memory-leaks
Closed

fix: TOC click in edit mode, memory leaks, scroll sync offset, and me…#62
resinya wants to merge 1 commit into
pd4d10:mainfrom
resinya:fix/toc-editor-memory-leaks

Conversation

@resinya

@resinya resinya commented Jun 12, 2026

Copy link
Copy Markdown

…rmaid error suppression

  • Fix TOC click not working in write-only mode by scrolling CodeMirror to heading source line via hast position data instead of scrollIntoView on hidden preview DOM
  • Fix inconsistent offsetHeight vs clientHeight in scroll ratio calculation causing scroll sync misalignment
  • Fix ResizeObserver memory leak by saving reference and disconnecting in onDestroy callback
  • Fix preview scroll event listener not being removed on destroy
  • Log mermaid render errors to console and show original code block as fallback instead of silently swallowing errors

…rmaid error suppression

- Fix TOC click not working in write-only mode by scrolling CodeMirror
  to heading source line via hast position data instead of
  scrollIntoView on hidden preview DOM
- Fix inconsistent offsetHeight vs clientHeight in scroll ratio
  calculation causing scroll sync misalignment
- Fix ResizeObserver memory leak by saving reference and disconnecting
  in onDestroy callback
- Fix preview scroll event listener not being removed on destroy
- Log mermaid render errors to console and show original code block as
  fallback instead of silently swallowing errors
@resinya resinya closed this by deleting the head repository Jun 15, 2026
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