React-md: Switch onChange is fired twice when clicking/touching the Switch's Button

Created on 18 Dec 2016  路  1Comment  路  Source: mlaursen/react-md

Why sometimes clicking on Switch button onChange is fired two times ?

bug

Most helpful comment

That is because I wanted the switch to be toggle-able by both clicking on its _track_ and having keyboard accessibility to press the enter key when focusing the button. However, I forgot about event propagation if you touch or click the button itself.

I have a fix that I can push up later this weekend.

>All comments

That is because I wanted the switch to be toggle-able by both clicking on its _track_ and having keyboard accessibility to press the enter key when focusing the button. However, I forgot about event propagation if you touch or click the button itself.

I have a fix that I can push up later this weekend.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichalWadowski picture MichalWadowski  路  4Comments

aleksanderd picture aleksanderd  路  7Comments

folivi picture folivi  路  8Comments

dandv picture dandv  路  9Comments

deadcoder0904 picture deadcoder0904  路  6Comments