-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
try 2: fix type when previous selection in input in some cases #5854
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
…ss-io#5854) * fix type when previous selection in input * cleanup * cleanup more * more cleanup * more more cleanup final * fix not firing input event in all cases
…ss-io#5854) * fix type when previous selection in input * cleanup * cleanup more * more cleanup * more more cleanup final * fix not firing input event in all cases
User facing changelog
.type
not respecting previous selection in non-selectionRange input element (email, number) (only way to change selection is with.select()
).type
not respecting previous selection if current value of the input is same as keyAdditional details
How has the user experience changed?
when attempting to use
.type
on a number or email input that has a text selection (or is selected in a focus handler):before (incorrect): text is appended to the current selection
after (correct): text replaces current selection
when attempting to use
.type
on an input that has a text selection (or is selected in a focus handler) of 1 character equal to the key typed:before (incorrect): ignores current key, next character replaces selection
after (correct): text replaces current selection, next character is typed after
PR Tasks