We have one checkbox and two inputs. When checkbox is checked, the order of the input is reversed. But there is one problem, if we type anything in the first input, then click on the checkbox, though the order is reversed for the inputs, but the entered value remains in the first input. Why does it happen? and What can we do to fix it?