Inputs with type="email"
seem to behave differently from Inputs with type="text
when it comes to getting it's value.
See http://jsbin.com/lanarureta/edit?html,js,console,output
I am trying to get the value with a space to use it in a controlled form component in React. The value now differs from what is displayed in the state:
<InputField
value={props.value}
onChange={(e, value) => props.onFieldChange("email", value)}
type="email"
/>
This causes the cursor to jump around. (see https://codepen.io/anon/pen/RKQrvr?editors=0010)
My solution would be to get the value with the spaces (nothing stripped away). How am I able to do this when I want to keep the type="email"
?
This only seems to happen on Chrome and Safari.