react-component / react-component/input-number
Something warning of cursor restore: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 188
- Avg merge
- 20h 3m
- Merged PRs (30d)
- 1
Description
Something warning of cursor restore. Please fire issue about this: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection
https://user-images.githubusercontent.com/5755214/172783532-30730fc4-96de-4f49-8853-ffa5a9561839.mp4
Sandbox Link: https://codesandbox.io/s/basic-antd-4-21-0-forked-0vmiip?file=/demo.js
Steps to reproduce:
1 - open sandbox
2 - select content of input
3 - write 9 inside
This error happens in console, which asks me to fire an issue here probably!
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 with the linked CodeSandbox and reproduce the warning by selecting the input contents and typing 9. Then trace the input-number cursor-restore behavior responsible for calling setSelectionRange on a number input. Done means the reproduction no longer logs the setSelectionRange error while preserving the expected input behavior.
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