[BUG] elementHandle.scrollIntoViewIfNeeded doesn't work properly
See original GitHub issueContext:
- Playwright Version: 1.4.2
- Operating System: Mac
- Node.js version: 12
- Browser: Chromium
- Extra: NA
Describe the bug
elementHandle.scrollIntoViewIfNeeded
won’t scroll if the element is partially visible. I think this might be unexpected behavior but I don’t see any details about this method on CDP.
2020-10-14T02:00:16.457Z pw:api => elementHandle.scrollIntoViewIfNeeded started
2020-10-14T02:00:16.458Z pw:api waiting for element to be visible and not moving
2020-10-14T02:00:16.481Z pw:api element is visible and does not move
2020-10-14T02:00:16.482Z pw:api <= elementHandle.scrollIntoViewIfNeeded succeeded
Here’s the page with selected element that I am trying to scroll into view
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Element.scrollIntoViewIfNeeded() - Web APIs - MDN Web Docs
The Element.scrollIntoViewIfNeeded() method scrolls the current element into the visible area of the browser window if it's not already within ...
Read more >html - Javascript: scrollIntoView() vs scrollIntoViewIfNeeded()
The Element.scrollIntoViewIfNeeded() method scrolls the current element into the visible area of the browser window if it's not already within ...
Read more >ElementHandle | Playwright - CukeTest
This method waits for the actionability checks, then scrolls element into view before taking a screenshot. If the element is detached from DOM,...
Read more >https://raw.githubusercontent.com/microsoft/playwr...
An example of handling a timeout error: ```js try { await page. ... "Incognito" browser contexts don't write any browsing data to disk....
Read more >Playwright changelog - Awesome Node.js - LibHunt
#4038 - [REGRESSION]: Tall screenshots in chromium get corrupted at bottom #4134 - [BUG] elementHandle.scrollIntoViewIfNeeded doesn't work properly
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 FreeTop 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
Top GitHub Comments
Sorry for the late response. I looked at this page, and there is a
position:fixed
header that covers the item, and we are not scrolling the item from under that header. Reduced repro:Oh nice! I am glad you were able to recreate it in a standalone manner and that this is a known bug. Thanks for following up on this. 😃