<?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>243107</bug_id>
          
          <creation_ts>2022-07-22 12:12:42 -0700</creation_ts>
          <short_desc>Safari re-snapping repeatedly on Twitter timeline after adding scroll snap user styles</short_desc>
          <delta_ts>2022-07-25 18:17:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Scrolling</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Šime Vidas">sime.vidas</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1886062</commentid>
    <comment_count>0</comment_count>
    <who name="Šime Vidas">sime.vidas</who>
    <bug_when>2022-07-22 12:12:42 -0700</bug_when>
    <thetext>Steps to reproduce: 

1. Open https://twitter.com/home
2. Run the following code in the JS console to inject scroll snap user styles to page:

    document.body.insertAdjacentHTML(
    &quot;beforeend&quot;,
    `
    &lt;style&gt;
    html {
        scroll-snap-type: y proximity !important;
    }

    article {
        scroll-snap-align: start !important;
    }

    [aria-label=&quot;Home timeline&quot;] &gt; :first-child {
        position: static !important;
        scroll-snap-align: start !important;
    }

    [aria-label=&quot;New Tweets are available.&quot;] {
        display: none !important;
    }
    &lt;/style&gt;
    `
    );

3. Start scrolling the page down repeatedly.

What happened?

At certain points, Safari will start re-snapping different tweets to the top while the user is doing nothing.

I have recorded a video of the issue: https://www.youtube.com/watch?v=i99ADUX9uak</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886064</commentid>
    <comment_count>1</comment_count>
    <who name="Šime Vidas">sime.vidas</who>
    <bug_when>2022-07-22 12:22:24 -0700</bug_when>
    <thetext>I forgot to mention how other browsers behave after adding scroll snap to the Twitter timeline:

- In Chrome, it works well, although there is an issue with fast scrolling.

- In Firefox, it works the best, but re-snapping has not shipped in Firefox yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886653</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-07-25 18:16:06 -0700</bug_when>
    <thetext>Thanks Šime for the report.

Step 0.
Need to be logged in on Twitter ;) 


So yes I can confirm, It is required to scroll fast and have scroll a certain amount of content. It seems partially related to reloading of the content. When the content disappears and reappears on the timeline (when out of the view) because of the scroll.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886654</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-07-25 18:17:45 -0700</bug_when>
    <thetext>Oh and each time this is happening it seems there is a Full Garbage Collection showing in the timeline tool.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886655</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-25 18:17:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/97580072&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>