uiwjs / uiwjs/react-codemirror

Tab press does not shift to next field in Snippet when used in controlled mode

Open
#381 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

Issue:

I want to add snippet with multiple fields in my code editor. I am able to add snippet but when I am trying to switch to next field using Tab, it does not shift to next field. Instead it shift current line. This only happens when I am trying to use the code mirror in controlled mode.

Reproducer: https://codesandbox.io/s/react-codemirror-example-codemirror-6-forked-vikoqq

Try adding <bar> and select the snippet. Notice that it won't switch to second field.

Any help would be appreciated.

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 with the controlled-mode handling in the react-codemirror component and reproduce the behavior using the linked CodeSandbox. Check how Tab is handled when a snippet has multiple fields; done means Tab advances to the next snippet field instead of shifting the current line.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.