Sergei Basharov
Sergei Basharov

Reputation: 53850

How to properly manage specific Safari inputs behavior?

I build an app in React. There is a signup form, where I enter email, password and other information.

All works as expected in Chrome, but it's kinda weird in Safari. When I begin entering something into an input, it doesn't put anything in that field, but shows this for email:

email input

How do I make it work just as it should in a regular scenario?

  1. onChange => changeField(value) via redux dispatch
  2. save in store
  3. rerender with new value

Even more weirdness is in the inspector which shows value attribute changing while typing, but the input is still empty visually.

value not visualized in DOM

Upvotes: 0

Views: 83

Answers (1)

Ematipico
Ematipico

Reputation: 1244

There's a big debate about onChange on other browsers, such as IE or Safari (depending on the version).

And so on...

What I suggest is to consider onInput in cases where the onChange fails to do what you expect due to time issues

Upvotes: 0

Related Questions