<?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>192862</bug_id>
          
          <creation_ts>2018-12-19 10:51:56 -0800</creation_ts>
          <short_desc>Anchor link in horizontal scroll container won&apos;t trigger scrolling if targeted element is at least partially in view</short_desc>
          <delta_ts>2021-07-08 01:33:03 -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>Layout and Rendering</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>42593</dup_id>
          
          <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="jonjohnjohnson">hi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>mrobinson</cc>
    
    <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>1489359</commentid>
    <comment_count>0</comment_count>
    <who name="jonjohnjohnson">hi</who>
    <bug_when>2018-12-19 10:51:56 -0800</bug_when>
    <thetext>Steps to reproduce the problem:
1. Go to https://vault.jonjohnjohnson.com/examples/scrolltabs/
2. Open up devtools and remove `scroll-snap-type` declaration from ruleset of &apos;.tabbed&apos; selector. (Sorry I don&apos;t have time to reduce case, but easily understandable without reduction)
3. Click tab 2. Click tab 1. See anchors exhibit scrolling to move either targeted panel into view.
4. Scroll horiztonally so that you are halfway between tabs/panels 1 and 2.
5. Now click tab 1 and tab 2 and notice how the browser will not align the targeted panels towards the scroll start edge of the scrollport.

What is the expected behavior?
Clicking anchors should always align targeted elements to corresponding scroll start edge in scrollport. Regardless of elements having been partially in view.

What went wrong?
Video of bug (without style alteration in devtools)
http://cl.ly/330c24b7c063

Does this work in other browsers? Yes, firefox.
Blink also has this same unexpected/broken behavior.

I&apos;d thought this would have already been reported, but couldn&apos;t find an issue. Sorry if this is a dup. :/




Same filing against blink https://bugs.chromium.org/p/chromium/issues/detail?id=916631</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490164</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-12-20 16:24:21 -0800</bug_when>
    <thetext>&lt;rdar://problem/46887211&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490181</commentid>
    <comment_count>2</comment_count>
    <who name="jonjohnjohnson">hi</who>
    <bug_when>2018-12-20 16:41:44 -0800</bug_when>
    <thetext>bokan@chromium.org did the due diligence of reducing this test case for the sister issue in blink: https://output.jsbin.com/lafedaj

Though notice, there is still a compat issue in that blink only scrolls so targeted element scrolls up to meet the bottom edge. While webkit scrolls it all the way to meet the top edge.

Firefox seems to have the most ironclad behavior, scrolling targeted element in to meet the nearest edges in each axis, which is what I&apos;m guessing blink will resolve on matching.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1775638</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2021-07-08 01:33:03 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 42593 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>