Bug: Cannot switch from Preview mode to other view modes via keyboard shortcut
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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