Tabs doesn't support primitive MouseEvent
See original GitHub issueVersion
2.13.10
Environment
macOS 10.12.6, Chrome Version 61.0.3163.100 (Official Build) (64-bit)
Reproduction link
https://codepen.io/tylerlong/pen/rYmjEj?editors=0010
Steps to reproduce
Open the link https://codepen.io/tylerlong/pen/rYmjEj?editors=0010. Click tabs and watch console output.
What is expected?
Should trigger MouseEvent documented here: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
What is actually happening?
Neither onClick
nor onclick
events of the tabs are triggered.
onTabClick
event was triggered BUT you can only get the targetKey as argument, you cannot get the primitive MouseEvent documented here: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
I created an issue which was closed without actually resolving: https://github.com/ant-design/ant-design/issues/8113
This time I created a new one with a reproducible link.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
a workaround in the meanwhile
pay attention to use onMouseUp and not onClick handler
close by https://github.com/react-component/tabs/pull/118