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.

Make `scrollIntoView` possible for mobile

See original GitHub issue

It seems that within mobile isDisplayed returns false if the element is not within viewport.

@wswebcreation can you confirm this?

~Therefor it would be useful to integrate the checkIfDisplayedWithScrollDown into isDisplayed. I suggest the following interface:~

~- isDisplayed(opts: isDisplayedOpts): boolean~ ~- where isDisplayedOpts = { maxScrolls: number, amount: number }~ ~- both isDisplayedOpts properties should default to 0~ ~- docs should clarify that these are only relevant for mobile environments~

Let’s enhance the scrollIntoView command to also support mobile environments and using the swipe functionality from #6536 and swipe until the element is within the view.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
christian-bromanncommented, Mar 3, 2021

Makes absolutely sense, scrollIntoView currently is only supported for web environments and this could make it cross platform compatible. Will update the issue.

1reaction
christian-bromanncommented, Dec 7, 2022

#9344 implements support for mobile for now, but it would be great to have native mobile support as well (using Appium’s swipe command or other native supported interactions).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mobile Safari, scrollIntoView doesn't work - Stack Overflow
Basically I use post message to tell the parent page to do the scrolling itself when inside Mobile Safari cross domain.
Read more >
Element.scrollIntoView() - Web APIs | MDN
The Element interface's scrollIntoView() method scrolls the element's ancestor ... Tip: you can click/tap on a cell for more information.
Read more >
scrollIntoView on Mobile - CodePen
Adding Classes. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template....
Read more >
Scroll into view interactions does not work on mobile
I figured out why it did not work. It's because the Scroll into view type of Interaction is dependent of the Body DOM...
Read more >
JavaScript scrollIntoView() Explained By Examples
The alignToTop is a boolean value. If it is set to true , the method will align the top of the element to...
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