uiwjs / uiwjs/react-md-editor

Bug: Cannot switch from Preview mode to other view modes via keyboard shortcut

Open
#452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
201
Avg merge
12m
Merged PRs (30d)
1

Description

Good day. This is the second part of the issue (first part: https://github.com/uiwjs/react-md-editor/issues/441)

There is a bug in the editor that when I switch from other view modes (ctrl + 7, 8, or 10) to preview mode (ctrl + 9), I cannot switch to other view modes using keyboard shortcuts anymore. I noticed that this is because the textarea editor is where the shortcuts/event listeners are attached to but it is missing from the DOM (probably had display: none) because of preview mode.

@jaywcjlove

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the editor's textarea and keyboard-shortcut handling, checking how preview mode removes or hides that element from the DOM. Reproduce the transition from Ctrl+9 to Ctrl+7, Ctrl+8, or Ctrl+10; done means each shortcut still switches view modes after entering preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.