Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cursor of controlled input of type email jumps to the beginning of input while deleting #19563

Closed
MrDonArmando opened this issue Aug 8, 2020 · 4 comments

Comments

@MrDonArmando
Copy link

MrDonArmando commented Aug 8, 2020

At least 2 words needs to be typed. Then after deleting first one from the end cursor jumps to the beginning of input. It happens only for input of type email so it's supposed to be one word(email) but let's say that user typed second word by mistake and then trying to delete cursor jumps to the end. It happens on Chrome, Opera, Microsoft Edge however on Firefox bug does not occure on Firefox

React version: 16.12.0

Steps To Reproduce

Create controlled input of type email and type firstWord secondWord. Try to delete secondWord and then firstWord

Link to code example:
https://codesandbox.io/s/react-cursor-jumps-to-end-for-input-type-email-9knfi?file=/src/App.js

The expected behavior

Cursor does not jump to beginning of input while deleting

@MrDonArmando MrDonArmando added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Aug 8, 2020
@bvaughn
Copy link
Contributor

bvaughn commented Aug 10, 2020

I can't reproduce the behavior described using Chrome, Firefox, or Safari (MacOS 10.15.6).

@MrDonArmando
Copy link
Author

@bvaughn I checked it only on Windows 10 and Ubuntu 20.04

@MrDonArmando MrDonArmando changed the title Bug: Cursor of controlled input of type email jumps to end while deleting Bug: Cursor of controlled input of type email jumps to the beginning of input while deleting Aug 11, 2020
@gaearon gaearon added Component: DOM Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Aug 17, 2020
@gaearon
Copy link
Collaborator

gaearon commented Aug 17, 2020

I can repro.

@gaearon
Copy link
Collaborator

gaearon commented Aug 17, 2020

This is the same as #15418.

@gaearon gaearon closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants