Skip to content

fix toolbar markdown preservation#156

Merged
ThisIs-Developer merged 1 commit into
mainfrom
codex/fix-toolbar-markdown-preservation
Jun 3, 2026
Merged

fix toolbar markdown preservation#156
ThisIs-Developer merged 1 commit into
mainfrom
codex/fix-toolbar-markdown-preservation

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

@ThisIs-Developer ThisIs-Developer commented Jun 3, 2026

Summary

  • Fixes toolbar formatting actions so markdown source is preserved, rendered, and autosaved correctly.
  • Updates the desktop app’s prepared script with the same fix.
  • Updates service worker caching so users do not keep running stale toolbar code.

Root Cause

Toolbar actions dispatch plain Event('input') events. These events do not include inputType, but handleKeystrokeHistory() assumed e.inputType was always a string and later called .startsWith(...).

That threw an error before preview rendering and autosave ran. As a result, the editor could show markdown like # Hello, while preview and persisted tab storage stayed on the previous plain-text value.

Validation

  • node --check script.js
  • node --check desktop-app/resources/js/script.js
  • node --check sw.js
  • Verified toolbar formatting for headings, bold, italic, lists, tables, code blocks, preview rendering, refresh persistence, and saved markdown preservation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Jun 3, 2026 8:03pm

@ThisIs-Developer ThisIs-Developer merged commit dd9f104 into main Jun 3, 2026
6 checks passed
@ThisIs-Developer ThisIs-Developer deleted the codex/fix-toolbar-markdown-preservation branch June 3, 2026 20:11
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