uiwjs / uiwjs/react-codemirror
onChange not detecting a change when a value is pasted ontop of another value
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
When using the component, I noticed that when I try to paste a value ontop of another value, the component doesn't detect a change. If the first value is deleted first or if there is a space placed after the component, then the onChange works as expected. Not sure if this works for other values, but this is broken with the language set to yaml...
For example if you this:
And directly paste an 8 over the 7 (by highlighting the 7 and pasting):
The onChange would not be called.
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 at the component's onChange handling and reproduce the reported case with YAML: select the 7 and paste 8 over it. Trace why the replacement is not reported, then verify that onChange fires for direct replacement as well as deletion-first and trailing-space cases.
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