react-component / react-component/select
当作为基本的select时不应该focus和render input,因为会改变document 的 selection 和native select 行为不一致
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
当作为基本的select时不应该focus和render input,因为会改变document 的 selection 和native select 行为不一致
当select用在富文本编辑器中用于改变选中文本的字体,选项弹出时会清空当前选中的文字,而native select并不会,调试后发现是rc-select 生成的 input导致的。
如下图,选中文字再点select会取消选中,而native select并不会
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 from the rc-select input behavior described in the issue and reproduce it inside a rich-text editor with selected text, then compare the result with a native select. Trace which focus or input-rendering path clears document selection; done means opening a basic select preserves the existing text selection and matches native select 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
- 38/100