If I run the demo in Firefox then open the output in a new window, in that new window open developer tools and enable Responsive Design Mode. Then clicking (not dragging) on the react-switch-handle in and off state will fire onChange twice off then on, similarly clicking in an on state will fire onChange twice on then off.
Attached a video capture of it, the drag works fine but single click shows double action.
Testing in Chrome and Firefox on Android it doesn't show this behavior, its only the Firefox Responsive design mode so this isn't a bug IMO just thought its worth knowing about and being concious of.
Hm ok. The sandbox has a switch that is inside of an iframe which doesn't work with this library as discussed in #35, so I'm not sure if you've discovered anything new or it's that same problem.
I borrowed this demo from another issue as it shows the behavior I experienced in a local app. https://codesandbox.io/s/vmwpv6x2ql
If I run the demo in Firefox then open the output in a new window, in that new window open developer tools and enable Responsive Design Mode. Then clicking (not dragging) on the
react-switch-handle
in and off state will fire onChange twice off then on, similarly clicking in an on state will fire onChange twice on then off.Attached a video capture of it, the drag works fine but single click shows double action.
Testing in Chrome and Firefox on Android it doesn't show this behavior, its only the Firefox Responsive design mode so this isn't a bug IMO just thought its worth knowing about and being concious of.