<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>236071</bug_id>
          
          <creation_ts>2022-02-03 03:52:21 -0800</creation_ts>
          <short_desc>window.pageYOffset is not updated immediately after scroll using &apos;element.focus&apos; method</short_desc>
          <delta_ts>2026-02-25 10:01:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="miherlosev">miherlosev</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1836851</commentid>
    <comment_count>0</comment_count>
      <attachid>450756</attachid>
    <who name="miherlosev">miherlosev</who>
    <bug_when>2022-02-03 03:52:21 -0800</bug_when>
    <thetext>Created attachment 450756
Page for reproduce

Reproduced with Safari 15.3

&apos;window.pageYOffset&apos; is not updated after scroll using &apos;element.focus&apos; method. 

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

The correct value is 200. Such value is getting for Chrome 97, Firefox 96, and Safari 11.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1837162</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-02-03 16:28:54 -0800</bug_when>
    <thetext>The scroll happens asynchronously, so window.pageYOffset is not immediately updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1839589</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-10 03:53:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/88747283&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2184844</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2026-02-25 10:00:58 -0800</bug_when>
    <thetext>Safari reports pageYOffset=0 now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2184846</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2026-02-25 10:01:19 -0800</bug_when>
    <thetext>...because focus() scrolls the box to the top.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>450756</attachid>
            <date>2022-02-03 03:52:21 -0800</date>
            <delta_ts>2022-02-03 16:27:54 -0800</delta_ts>
            <desc>Page for reproduce</desc>
            <filename>file_236071.txt</filename>
            <type>text/html</type>
            <size>552</size>
            <attacher name="miherlosev">miherlosev</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KICAgIDx0aXRsZT5HSC05MTM8L3RpdGxl
Pg0KPC9oZWFkPg0KPGJvZHk+DQo8ZGl2IGlkPSJwYXJlbnQiIHN0eWxlPSJ3aWR0aDo1MDBweDsg
aGVpZ2h0OjIwMDBweDsgdG9wOjIwMHB4OyBwb3NpdGlvbjphYnNvbHV0ZTsgYmFja2dyb3VuZDpn
cmV5OyIgdGFiaW5kZXg9IjAiPg0KICAgIDxkaXYgaWQ9ImNoaWxkIiBzdHlsZT0id2lkdGg6MTAw
cHg7IGhlaWdodDoxMDBweDsgdG9wOjEwMHB4OyBwb3NpdGlvbjphYnNvbHV0ZTsgYmFja2dyb3Vu
ZDpyZWQ7Ij48L2Rpdj4NCjwvZGl2Pg0KPHNjcmlwdD4NCiAgICBzZXRUaW1lb3V0KGZ1bmN0aW9u
ICgpew0KICAgICAgICB2YXIgcGFyZW50RGl2ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3Bh
cmVudCcpOw0KDQogICAgICAgIHBhcmVudERpdi5mb2N1cygpOw0KDQogICAgICAgIGRvY3VtZW50
LnRpdGxlID0gJ3dpbmRvdy5wYWdlWU9mZnNldD0nICsgd2luZG93LnBhZ2VZT2Zmc2V0Ow0KICAg
IH0sIDUwMDApOw0KPC9zY3JpcHQ+DQo8L2JvZHk+DQo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>