Repository navigation
Rich Markdown Bugs We Fixed
github-actions[bot] edited this page Oct 18, 2026
·
1 revision
Bugs found in the Rich Editor, what caused each, and why we fixed it the way we did. Older ones are listed in that chapter.
One typed letter rewrote a list higher up the page.
-
The issue: typing one letter into a paragraph of
Browser-Release-Checks.mdalso changed a numbered list above it: its wrapped lines lost two of their three spaces of indent. The code span`nibtree@<version>`was saved as an[[ORCA_RICH_MD:...]]placeholder. The corpus test inrichEditor.test.tscaught it in CI. -
Why it happened: before the editor reads a file,
raw-markdown-html.tsswaps raw HTML for placeholders and skips code spans, so<version>inside backticks stays text. It knew it was leaving a fenced code block on the closing```line, but then went on to scan that same line for code spans. The fence's last backtick paired with the opening backtick of the next code span, so from there every code span was read inside out:<version>looked like HTML outside code and got a placeholder that is never put back inside code. The saved text no longer matched the file, so the editor wrote the whole document again in its own style, list indents included. -
The fix and why we chose it: the closing fence line is copied as it is and the scan goes on at the next line. A fence line can hold nothing but the fence, so nothing on it needs scanning. The test in
raw-markdown-html.fences.test.tsencodes a code span with a tag after a backtick fence and expects the text back unchanged.
Opening a Markdown file slid the whole window up.
- The issue: on macOS, opening a Markdown file in the Rich Editor moved the whole app up under the title bar, with an empty band under the status bar. The document itself opened scrolled down. Other tabs stayed shifted until the app was restarted.
-
Why it happened: ProseMirror keeps the view steady across an update. Where the browser supports CSS
overflow-anchor, it leaves that to the browser; elsewhere it records thescrollTopof every ancestor up to the page and writes them back, moved by how far a reference line moved. It checks support withview.dom.style.overflowAnchor == null. WebKit, the macOS web view, has nooverflow-anchor, so on load ProseMirror wrote 145px to every ancestor,bodyincluded, and each one that could scroll did. Chromium has the property, so the test browser pages never showed it. -
How we found it:
trace_scrolls(see Debugging with MCP) aroundopen_filelisted ascrollTopwrite to every ancestor, all fromrestoreScrollStackin ProseMirror's view. -
The fix and why we chose it:
richEditor.tssetsoverflowAnchor = "auto"on the editor's element. On WebKit that makes the check false, so ProseMirror stops moving the ancestors; on Chromiumautois already the default, so nothing changes there. Making every app container unscrollable instead would have hidden the next library that scrolls ancestors, not fixed this one.
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode