react-component / react-component/tabs
Can't focus on any input if there is rc-tabs on page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 572
- Forks
- 241
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 4
Description
I'm having react-virtualized auto-sized grid inside of rc-tabs/es/Tab component
As you can see in react-virtualized example, the grid always have document.querySelector('.expand-trigger').scrollLeft === 1
https://bvaughn.github.io/react-virtualized/#/components/AutoSizer
This scroll value of autosized grid child causes dead-loop blurs when its inside rc-tabs
This bug was introduced in v9.3.1 by commit https://github.com/react-component/tabs/commit/1194be5
Probably it may be fixed by checking if document.activeElement is inside rc-tabs (eg here), for not to blur every element on page
Any way, bluring looks like hack
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 src/Tabs.js around line 83 and reproduce the issue with a react-virtualized AutoSizer grid inside rc-tabs/es/Tab, using the linked AutoSizer example. Trace the blur behavior triggered by the grid's scrollLeft value; done means inputs outside the tabs no longer enter the blur loop while tab behavior remains intact.
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