React: Field type="email" with multiple attribute cursor jumps to start

Created on 15 Apr 2019  路  10Comments  路  Source: facebook/react

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
While adding multiple comma separated email addresses the cursor will jump to te beginning the input field. First i thought it was a Formik issue, but it seems to be a React one.

Example pure React: https://codesandbox.io/embed/0y06zo7l8p
Example React with Formik: https://codesandbox.io/embed/k57zw7wz5
MDN docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#multiple

What is the expected behavior?
Cursor stays on current position.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Chrome 73, Safari 12.1, Opera 60.0
React 16.7.0

Maybe #14551 related?

DOM Bug

All 10 comments

May I take this bug for PR?

@Nizarius for sure

Any progress update on this? I see that a PR was opened months ago, but it's still open. I'm still seeing this behavior today.

The PR is still open. Can I work on this?

@karthikpriyadarshan-alation thank you for your question! Do you want to work with my PR where it's fixed but needs a regression fixture to https://github.com/facebook/react/tree/master/fixtures/dom and a detailed test plan? I can give you rights to work with my repository.

See https://github.com/facebook/react/pull/18459. We should fix it but I think this needs to wait a bit more.

I made a fix in chrome which should fix this problem which should be released in chrome 85, try it out on canary: https://www.google.com/chrome/canary/

@josepharhar Do you know if there are similar fixes for other browsers?

@josepharhar Do you know if there are similar fixes for other browsers?

Firefox was never affected by this issue and I am planning on merging the fix to WebKit soon.

I finally landed the fix in webkit. I don't know anything about safari's release cycle or when it will get to stable.

Was this page helpful?
0 / 5 - 0 ratings