react-component / tabs

React Tabs
https://tabs.react-component.now.sh/
MIT License
563 stars 231 forks source link

Can't focus on any input if there is rc-tabs on page #133

Open nezed opened 6 years ago

nezed commented 6 years ago

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

nezed commented 6 years ago

Probably this issue was fixed by https://github.com/react-component/tabs/commit/c046cfb7ed7d2652bab00d5c20fdb89f9fbc11eb and was released in v9.3.6

And https://github.com/ant-design/ant-design/issues/11261 may be related to it, but i don't understand what are happening there ¯\(ツ)

nezed commented 6 years ago

There more discussion about additional bug introduced with commit 1194be5 https://github.com/ant-design/ant-design/issues/11621#issuecomment-410666176

Looks like it really fixed in v9.3.6 And will be re-implemented in https://github.com/react-component/tabs/pull/138