Bug 236071

Summary: window.pageYOffset is not updated immediately after scroll using 'element.focus' method
Product: WebKit Reporter: miherlosev <miherlosev>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 12   
Attachments:
Description Flags
Page for reproduce none

Description miherlosev 2022-02-03 03:52:21 PST
Created attachment 450756 [details]
Page for reproduce

Reproduced with Safari 15.3

'window.pageYOffset' is not updated after scroll using 'element.focus' method. 

Steps to reproduce:
1)Open an attached page in the browser
2)Wait 5 seconds
3)After that, the 'document.title will' contain the 'window.pageYOffset' value.

The correct value is 200. Such value is getting for Chrome 97, Firefox 96, and Safari 11.1.
Comment 1 Simon Fraser (smfr) 2022-02-03 16:28:54 PST
The scroll happens asynchronously, so window.pageYOffset is not immediately updated.
Comment 2 Radar WebKit Bug Importer 2022-02-10 03:53:14 PST
<rdar://problem/88747283>