question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standard scrollTo usage often results in errors

See original GitHub issue

Current behavior:

Running the example code, which performs a simple scrollTo often results in an error stating that multiple elements cannot be scrolled.

Desired behavior:

Don’t error, and scroll the page. 🤡

How to reproduce:

Run the example code.

Test code:

  context('Page Scroll', () => {
    it('should work', () => {
      cy.visit('https://www.theguardian.com/uk')
      cy.scrollTo('0%', '35%')
    })
  })

Additional Info (images, stack traces, etc)

screenshot 2017-10-17 16 03 22
  • Operating System: Mac OS 10.12.6
  • Cypress Version: 1.0.2
  • Browser Version: Chrome 61

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
samuelmartineaucommented, Jul 11, 2018

@ctrlplusb You could temporarily use vanilla js before having a real fix on scrollTo

cy.window().then(win => {
  win.scrollTo('0%', '35%');
})
3reactions
binaryst4rcommented, Apr 25, 2018

Any updates to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Element.scrollTop - Web APIs | MDN
An element's scrollTop value is a measurement of the distance from the element's top to its topmost visible content.
Read more >
ScrollIntoView() causing the whole page to move
If there's more than one scrollable element that you want to scroll, you'll need to change the scrollTop of each one individually, based...
Read more >
How Scrolling Can Make (Or Break) Your User Experience
Failure to cluster relevant information throughout key points in a text can lead to a phenomenon called “scrolling fatigue.” Scrolling fatigue has two...
Read more >
Explanation of Error Categories
The error categories used in the ATA Certification Exam grading process are defined and explained.
Read more >
Comparing Data: How to Use Reliability Measures in Real Life
For definitions of reliability measures like confidence intervals, margins of error, and standard deviation, scroll to the end of this post ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found