New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work with browser-sync #13
Comments
Codepen reproducing the issue: |
I am trying to leverage this control in the react-slingshot framework. It seems like a similar issue to this is cropping it's head up. I have forked the repo for slingshot and modified it to include the rc-checkbox control in the App component. If you do an Any ideas on how to fix this? I have gone down this rabbit hole, but had no luck. Happy to help out more if needed. |
this bug is till in antd 2.6.4 |
we do not use browser-sync, but pr is welcomed |
Browser sync injects a extra
blur(); focus();
to checkboxes and radios at theaddEventListener
level.Resulting in the following sequence of events:
When the onChange is called the
e.target.chacked
is no longertrue
and thus the checkbox never toggles its state.This only fails in
1.3.4
since the addition ofonBlur
andonFocus
that change the component state.If I comment out the
setState
lines fromonBlur
andonFocus
it works correctly (albeit isFocused support is lost ofc)The text was updated successfully, but these errors were encountered: