forked from puppeteer/puppeteer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(page): fix page.#scrollIntoViewIfNeeded method
This patch fixes page.#scrollIntoViewIfNeededso that it works with devtools protocol. Now it blocks the main thread and waits until the scrolling action finishes. Issues: puppeteer#8627, puppeteer#1805 BREAKING CHANGE: page.#scrollIntoViewIfNeeded throws erros which come from the internal implementation. - `Protocol error (DOM.scrollIntoViewIfNeeded): Node is detached from document` - `Protocol error (DOM.scrollIntoViewIfNeeded): Node does not have a layout object` Also now it does work with TextNode properly and does not throw an error.
- Loading branch information
Showing
3 changed files
with
56 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Button test</title> | ||
</head> | ||
<body> | ||
<script src="mouse-helper.js"></script> | ||
<div style="width: 5000px; height: 5000px;"></div> | ||
<button onclick="clicked();">Click target</button> | ||
<script> | ||
window.result = 'Was not clicked'; | ||
function clicked() { | ||
result = 'Clicked'; | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters