gio-design
gio-design copied to clipboard
[Input]: 某些事件会调用两次
Describe the bug
onClick, onFocus, onBlur, onMouseEnter, onMouseLeave 事件会调用两次
To Reproduce
最小复现 Demo:
const Demo = () => <Input.Button placeholder="Click me" onClick={(e) => console.log(e)} />
在此组件上点击一次,会触发两次 onClick 的调用;
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
https://user-images.githubusercontent.com/48519459/169443539-224c3552-f8cc-4872-a265-362be2a2d280.mp4
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.