<?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>169800</bug_id>
          
          <creation_ts>2017-03-16 17:55:18 -0700</creation_ts>
          <short_desc>After a programmatic scroll in a scroll snap container, the scroll offset jumps to the last reached snap offset</short_desc>
          <delta_ts>2021-06-03 03:22:57 -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>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Malte Ubl">malte</reporter>
          <assigned_to name="Wenson Hsieh">wenson_hsieh</assigned_to>
          <cc>jonlee</cc>
    
    <cc>mrobinson</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>sriramkrish85</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1288880</commentid>
    <comment_count>0</comment_count>
    <who name="Malte Ubl">malte</who>
    <bug_when>2017-03-16 17:55:18 -0700</bug_when>
    <thetext>I&apos;m sorry that we do not currently have a reduced repro case, but we thought you might want to know that CSS snap points are broken in Safari in current iOS 10.3 beta 2.

More details here https://github.com/ampproject/amphtml/issues/7670

The bug has a few repro URLs.

This affects a large subset of AMP pages (likely a few 100 million). We will revert to non-snap points behavior, but this will represent a signficiant regression in UX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1288885</commentid>
    <comment_count>1</comment_count>
    <who name="Malte Ubl">malte</who>
    <bug_when>2017-03-16 18:18:58 -0700</bug_when>
    <thetext>Updated to reflect that this is still broken in beta 6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1288896</commentid>
    <comment_count>2</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-03-16 18:47:24 -0700</bug_when>
    <thetext>Here is the URL to reproduce what Malte described below

http://amphtml-nightly.herokuapp.com/test/manual/amp-slidescroll.amp.html



Videos:


Working slides on IOS 10.2- https://www.youtube.com/watch?v=DkI5U9Sqlm4

Broken slides on IOS 10.3 beta (test on beta 7) - https://www.youtube.com/watch?v=r6jZILTvt5E</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1288929</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-03-16 21:41:08 -0700</bug_when>
    <thetext>The syntax changed to match the latest spec:
https://drafts.csswg.org/css-scroll-snap-1/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1288951</commentid>
    <comment_count>4</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-03-16 23:36:39 -0700</bug_when>
    <thetext>@smfr - is there a date when this would come out of beta?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1289926</commentid>
    <comment_count>5</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-03-21 18:20:14 -0700</bug_when>
    <thetext>Ok - Now i got clarity into what the real issue is. This is because of snap points

This is not because of the syntax change , the old syntax still works fine on the beta.
The only issue is when we set scrollLeft on the container via JS, the browser resets it back to the last known snap position set via css snapping. the right behavior would be to snap to the closest snap point.

Here is my JS BIN

http://jsbin.com/fiwiqo/61/edit?html,css,js,output

And the video demonstrating what is wrong.

https://youtu.be/r5P8d-k1Q1Y</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291151</commentid>
    <comment_count>6</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-03-24 22:14:23 -0700</bug_when>
    <thetext>@Wenson Hsieh, any updates on this? will this be fixed before the beta launches?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291177</commentid>
    <comment_count>7</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2017-03-25 01:49:58 -0700</bug_when>
    <thetext>(In reply to Sriram Krishnan from comment #6)
&gt; @Wenson Hsieh, any updates on this? will this be fixed before the beta
&gt; launches?

Unfortunately, I cannot comment on what changes will make it into future releases. However, I will make it a priority to investigate and fix this problem on ToT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291179</commentid>
    <comment_count>8</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2017-03-25 02:08:22 -0700</bug_when>
    <thetext>&lt;rdar://problem/31257989&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294132</commentid>
    <comment_count>9</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-04-04 13:17:01 -0700</bug_when>
    <thetext>Any update on when this would be fixed. As Malte mentioned it affects a few 100 million (AMP) pages, it would be great to get this fixed at the earliest possible!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294151</commentid>
    <comment_count>10</comment_count>
    <who name="Jon Lee">jonlee</who>
    <bug_when>2017-04-04 13:56:19 -0700</bug_when>
    <thetext>Thanks. Unfortunately, we cannot discuss release dates, but understand that this is a very important bug for AMP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294659</commentid>
    <comment_count>11</comment_count>
      <attachid>306322</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2017-04-05 14:57:23 -0700</bug_when>
    <thetext>Created attachment 306322
Reduced test case adapted from &lt;http://output.jsbin.com/fiwiqo&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314378</commentid>
    <comment_count>12</comment_count>
    <who name="Sriram Krishnan">sriramkrish85</who>
    <bug_when>2017-05-31 15:44:57 -0700</bug_when>
    <thetext>I believe this was solved in https://bugs.webkit.org/show_bug.cgi?id=170560 - can some one correct me if i am wrong?

@Wenson Hsieh</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766339</commentid>
    <comment_count>13</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2021-06-03 03:22:57 -0700</bug_when>
    <thetext>I can no longer reproduce this. I think it&apos;s fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>306322</attachid>
            <date>2017-04-05 14:57:23 -0700</date>
            <delta_ts>2017-04-05 14:57:23 -0700</delta_ts>
            <desc>Reduced test case adapted from &lt;http://output.jsbin.com/fiwiqo&gt;</desc>
            <filename>scroll-snap-fixed-div.html</filename>
            <type>text/html</type>
            <size>2721</size>
            <attacher name="Wenson Hsieh">wenson_hsieh</attacher>
            
              <data encoding="base64">PGhlYWQ+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdp
ZHRoLCBpbml0aWFsLXNjYWxlPTEiPgogICAgPHN0eWxlPgogICAgKiB7CiAgICAgICAgcGFkZGlu
ZzogMDsKICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgZm9udC1mYW1pbHk6IC1hcHBsZS1zeXN0
ZW07CiAgICB9CgogICAgI2NvbnRhaW5lciB7CiAgICAgICAgd2lkdGg6IDEwMHZ3OwogICAgICAg
IGhlaWdodDogMzAwcHg7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgfQoKICAgICNj
b250cm9scyB7CiAgICAgICAgdG9wOiAzMDBweDsKICAgICAgICB3aWR0aDogMTAwdnc7CiAgICAg
ICAgaGVpZ2h0OiAxMDBweDsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICB9CgogICAg
I291dGVyIHsKICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgIGRpc3BsYXk6
IGZsZXg7CiAgICAgICAgZmxleC13cmFwOiBub3dyYXA7CiAgICAgICAgd2lkdGg6IDEwMCU7IGhl
aWdodDogMTAwJTsKICAgICAgICBsZWZ0OiAwOyB0b3A6IDA7CiAgICAgICAgb3ZlcmZsb3cteDog
YXV0bzsgb3ZlcmZsb3cteTogaGlkZGVuOwogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAg
ICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwoKICAgICAgICAtd2Via2l0LW92ZXJmbG93LXNjcm9s
bGluZzogdG91Y2g7CiAgICAgICAgc2Nyb2xsLXNuYXAtdHlwZTogbWFuZGF0b3J5OwogICAgICAg
IC13ZWJraXQtc2Nyb2xsLXNuYXAtdHlwZTogbWFuZGF0b3J5OwogICAgfQoKICAgIC5pbm5lciB7
CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAg
ICAgIGZsZXg6IDAgMCAxMDAlOwogICAgICAgIHdpZHRoOiAxMDAlOyBoZWlnaHQ6IDEwMCU7Cgog
ICAgICAgIHNjcm9sbC1zbmFwLWFsaWduOiBzdGFydDsKICAgICAgICAtd2Via2l0LXNjcm9sbC1z
bmFwLWNvb3JkaW5hdGU6IDAgMDsKICAgIH0KCiAgICAjZml4ZWQgewogICAgICAgIHBvc2l0aW9u
OiBmaXhlZDsKICAgICAgICB0b3A6IDA7IHJpZ2h0OiAwOwogICAgICAgIHdpZHRoOiA1ZW07IGhl
aWdodDogNWVtOwogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlOwogICAgfQoKICAgIGEg
ewogICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTsKICAgICAgICBmb250LXNpemU6IDIwcHg7
CiAgICB9CiAgICA8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