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

Using Contenteditable and type - caret does not move #1108

Closed
mikeyarce opened this issue Dec 20, 2017 · 1 comment · Fixed by #2016
Closed

Using Contenteditable and type - caret does not move #1108

mikeyarce opened this issue Dec 20, 2017 · 1 comment · Fixed by #2016
Assignees
Milestone

Comments

@mikeyarce
Copy link

  • Operating System: Mac OS Sierra
  • Cypress Version: 1.4.0
  • Browser Version: Chrome 63.0.3239.108

Is this a Feature or Bug?

Bug

Current behavior:

Using the Cypress type function on a contenteditable input doesn't move the caret along with the text. At first I thought this might be specific to React, but actually it does the same thing with a plain contenteditable input on any HTML page.

Desired behavior:

To move the caret with the text so you can simulate typing and do things like {enter}

How to reproduce:

  1. Create a contenteditable html element
  2. Use type() on that element

Test code:

<p contenteditable="true">
    Hello
</p>

cy.get('p').type('hello', {delay: 1000})

The delay is helpful so you can actually see the caret as it's being typed out.

Additional Info (images, stack traces, etc)

contenteditable

@kuceb
Copy link
Contributor

kuceb commented Jun 29, 2018

This issue should be fixed in an upcoming patch release, alongside other issues from the #1241 cy.type() epic

@kuceb kuceb added this to the 3.0.3 milestone Jun 29, 2018
@kuceb kuceb self-assigned this Jun 29, 2018
@jennifer-shehane jennifer-shehane added stage: investigating Someone from Cypress is looking into this and removed stage: ready for work The issue is reproducible and in scope labels Jun 29, 2018
@kuceb kuceb removed the stage: investigating Someone from Cypress is looking into this label Jul 16, 2018
brian-mann pushed a commit that referenced this issue Jul 23, 2018
this grew to a large PR fixing many cy.type issues.

fix #365
fix #420
fix #586 
fix #593 
fix #596 
fix #610 
fix #651
fix #940
fix #1002 
fix #1108
fix #1171
fix #1209 
fix #1234 
fix #1366
fix #1381 
fix #1684 
fix #1686
fix #1926 
fix #2056
fix #2096 
fix #2110 
fix #2173
fix #2187
@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: needs review The PR code is done & tested, needs review stage: needs investigating Someone from Cypress needs to look at this stage: in progress labels Jul 23, 2018
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