Skip to content

Commit ec353c3

Browse files
authored
Fix ScrollIntoViewIfNeededAsync script (#803)
1 parent cc27f99 commit ec353c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/PuppeteerSharp/ElementHandle.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ private async Task ScrollIntoViewIfNeededAsync()
465465
// force-scroll if page's javascript is disabled.
466466
if (!pageJavascriptEnabled) {
467467
element.scrollIntoView({block: 'center', inline: 'center', behavior: 'instant'});
468-
return false;
468+
return null;
469469
}
470470
const visibleRatio = await new Promise(resolve => {
471471
const observer = new IntersectionObserver(entries => {
@@ -476,7 +476,7 @@ private async Task ScrollIntoViewIfNeededAsync()
476476
});
477477
if (visibleRatio !== 1.0)
478478
element.scrollIntoView({block: 'center', inline: 'center', behavior: 'instant'});
479-
return false;
479+
return null;
480480
}", this, Page.JavascriptEnabled).ConfigureAwait(false);
481481

482482
if (errorMessage != null)

0 commit comments

Comments
 (0)