Skip to content

Hotkeys Stop Working After Switching Between Preview and Edit Modes #1298

Closed

Description

Bug Report: Hotkeys Stop Working After Switching Between Preview and Edit Modes

🐛 Bug Description

When using the Markdoc editor, keyboard shortcuts (hotkeys) stop functioning after switching from editing mode to preview mode and back to editing mode.

🔍 Steps to Reproduce

  1. Navigate to the editor page (/create or /create/{id})
  2. Start typing in the editor textarea
  3. Test any hotkey (e.g., Ctrl+B for bold, Ctrl+I for italic, Ctrl+1 for heading 1)
    • ✅ Hotkeys work correctly
  4. Click the "View preview" button
  5. Click the "Back to editing" button
  6. Try using the same hotkeys again
    • ❌ Hotkeys no longer work

🎯 Expected Behavior

Hotkeys should continue to work normally after switching between preview and edit modes.

💻 Current Behavior

Hotkeys become unresponsive after returning from preview mode to editing mode.

Affected Hotkeys

All markdown formatting hotkeys are affected:

  • Ctrl+1 through Ctrl+6 - Headings
  • Ctrl+B - Bold
  • Ctrl+I - Italic
  • Ctrl+Shift+B - Bold Italic
  • Ctrl+S - Code snippet
  • Ctrl+Shift+C - Code block
  • Ctrl+Shift+. - Block quote
  • Ctrl+L - Link
  • Ctrl+Shift+I - Image
  • Ctrl+U - URL
  • Backspace - Select previous

Activity

  1. github-actions commented on Oct 18, 2025

    @github-actions

    Hello @ai-engineer-devansh-singh, thanks for opening your first issue! Your contribution is valuable to us. The maintainers will review this issue and provide feedback as soon as possible.

  2. ai-engineer-devansh-singh commented on Oct 18, 2025

    @ai-engineer-devansh-singh
    ContributorAuthor

    kindly assign this to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions