Skip to content

fix: italic shortcut#1039

Merged
perber merged 1 commit into
mainfrom
fix/editor-italic-shortcut
May 24, 2026
Merged

fix: italic shortcut#1039
perber merged 1 commit into
mainfrom
fix/editor-italic-shortcut

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 24, 2026 15:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a Chrome-specific conflict where the browser’s native rich-text formatting (via beforeinput) can interfere with CodeMirror’s Markdown bold/italic shortcuts, and adds E2E coverage plus stable selectors for toolbar formatting buttons.

Changes:

  • Added beforeinput DOM event handling in the CodeMirror editor to prevent native formatBold/formatItalic behavior.
  • Added data-testid attributes for Bold/Italic toolbar buttons to support reliable E2E selection.
  • Added Playwright E2E tests covering bold/italic formatting via both keyboard shortcuts and toolbar buttons.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx Adds data-testid hooks for bold/italic toolbar buttons used by E2E tests.
ui/leafwiki-ui/src/features/editor/MarkdownCodeEditor.tsx Prevents Chrome beforeinput formatting actions (formatItalic/formatBold) so CodeMirror shortcuts work reliably.
e2e/tests/editor.spec.ts Adds E2E coverage verifying bold/italic insertion works via keyboard and toolbar.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@perber perber merged commit e6833e6 into main May 24, 2026
9 checks passed
@perber perber deleted the fix/editor-italic-shortcut branch May 24, 2026 15:50
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.

2 participants