Make `scrollIntoView` possible for mobile
See original GitHub issueIt 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:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Makes absolutely sense,
scrollIntoView
currently is only supported for web environments and this could make it cross platform compatible. Will update the issue.#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).