Skip to content

type() does not scroll properly after a clear() #16283

Open
@JessefSpecialisterren

Description

Current behavior

When type() is invoked after a clear(), it does not scroll the input out from under a position:fixed element

Desired behavior

type() should scroll the input out from under the position:fixed element, just like it does when it's not following a clear()

Test code to reproduce

scroll.html

<body style="height: 200vh; padding-top: 30px;">
    <span style="background-color: brown; position: fixed; top: 0px; left: 0px; width: 100%; height: 30px; margin-left: 0px;"></span>
    <input type="text" />
</body>

scroll.spec.js

context('...', () => {
  it('...', () => {
      cy.visit('scroll.html')
      cy.get('input')
        .clear() // Comment this line to see how type() normally behaves
        .type('abc')
  })
})

Versions

Cypress 7.2.0
Google Chrome 90.0.4430.93
Windows 10 Pro 2004

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.pkg/driverThis is due to an issue in the packages/driver directoryprevent-stalemark an issue so it is ignored by stale[bot]stage: ready for workThe issue is reproducible and in scopetype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions