<?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>174892</bug_id>
          
          <creation_ts>2017-07-27 08:20:59 -0700</creation_ts>
          <short_desc>When animating in a sidebar, if it contains an &lt;input&gt; with autofocus, the page scrolls sideways</short_desc>
          <delta_ts>2017-07-28 05:56:17 -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>Animations</component>
          <version>Safari 10</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Bob Lail">bob.lail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>hyatt</cc>
    
    <cc>jonlee</cc>
    
    <cc>matt.kobs</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1332646</commentid>
    <comment_count>0</comment_count>
      <attachid>316547</attachid>
    <who name="Bob Lail">bob.lail</who>
    <bug_when>2017-07-27 08:20:59 -0700</bug_when>
    <thetext>Created attachment 316547
.html document exhibiting the bug

I&apos;ve attached a static web page that exhibits the problem and shows how &lt;html&gt;&apos;s bounding client rect is static when animating a surface containing `&lt;input&gt;` and how it changes when animating a surface containing `&lt;input autofocus&gt;`.

This issue sounds like it might be related to Bug 131293, but I couldn&apos;t reproduce that bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332678</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-07-27 10:57:08 -0700</bug_when>
    <thetext>&lt;rdar://problem/33571236&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332876</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-27 22:20:57 -0700</bug_when>
    <thetext>Does this happen if you don&apos;t use display:flex?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332877</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-27 22:23:37 -0700</bug_when>
    <thetext>Chrome shows this same behavior. Firefox is similar; it pins the document to the left side, but the document width is still changing as the sidebar comes in.

This is a weird way to animate in the sidebar, because the document width is changing (look at the scrollbars).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332944</commentid>
    <comment_count>4</comment_count>
    <who name="Bob Lail">bob.lail</who>
    <bug_when>2017-07-28 05:49:02 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #2)
&gt; Does this happen if you don&apos;t use display:flex?

Yes, it does. `display:flex` is only on the body causing the #surfaces div to be as tall as the window minus the height of the header. If you comment that out, you&apos;ll see the bug, it&apos;s just that the sidebar will only be 64px tall</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332945</commentid>
    <comment_count>5</comment_count>
    <who name="Bob Lail">bob.lail</who>
    <bug_when>2017-07-28 05:52:32 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #3)
&gt; Chrome shows this same behavior. Firefox is similar; it pins the document to
&gt; the left side, but the document width is still changing as the sidebar comes
&gt; in.
&gt; 
&gt; This is a weird way to animate in the sidebar, because the document width is
&gt; changing (look at the scrollbars).

Yeah, I noticed the scrollbars and thought at first that setting `max-width` on something would circumvent the problem; but part of strangeness here is that the widths of `#surfaces`, `body`, and `html` *aren&apos;t* changing. If you modify the step function in my example to output those values, you&apos;ll see what I mean.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332947</commentid>
    <comment_count>6</comment_count>
    <who name="Bob Lail">bob.lail</who>
    <bug_when>2017-07-28 05:54:58 -0700</bug_when>
    <thetext>Simon, I changed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332948</commentid>
    <comment_count>7</comment_count>
    <who name="Bob Lail">bob.lail</who>
    <bug_when>2017-07-28 05:56:17 -0700</bug_when>
    <thetext>Simon, I changed the summary to remove the part about &quot;shrinking flex items&quot; since that seems to be a red herring. If you remove all the flexbox CSS from my example, you can still see the bug: the page just looks goofier ;-)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>316547</attachid>
            <date>2017-07-27 08:20:59 -0700</date>
            <delta_ts>2017-07-27 08:20:59 -0700</delta_ts>
            <desc>.html document exhibiting the bug</desc>
            <filename>autofocus-bug.html</filename>
            <type>text/html</type>
            <size>2575</size>
            <attacher name="Bob Lail">bob.lail</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgogIDx0aXRsZT5BbmltYXRpb24gYnVnIHdpdGggYXV0b2ZvY3VzPC90aXRs
ZT4KICA8c3R5bGU+CiAgICBodG1sIHsgYm94LXNpemluZzogYm9yZGVyLWJveDsgfQogICAgKiwg
Kjo6YmVmb3JlLCAqOjphZnRlciB7IGJveC1zaXppbmc6IGluaGVyaXQ7IH0KCiAgICBodG1sLCBi
b2R5IHsKICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICBtYXJnaW46IDA7CiAgICAgIHBhZGRpbmc6
IDA7CiAgICB9CgogICAgYm9keSB7CiAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgIGZsZXgtZGly
ZWN0aW9uOiBjb2x1bW47CiAgICAgIGZvbnQtZmFtaWx5OiBzYW5z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ICAgIHZhciByZWN0ID0gZG9jdW1lbnQuYm9keS5wYXJlbnRFbGVtZW50LmdldEJvdW5kaW5n
Q2xpZW50UmVjdCgpOwogICAgICAgICAgICAgICRib3VuZGluZ1JlY3QuaHRtbCgKICAgICAgICAg
ICAgICAgICc8ZHQ+dG9wOjwvZHQ+PGRkPicgKyByZWN0LnRvcCArICc8L2RkPicgKwogICAgICAg
ICAgICAgICAgJzxkdD5yaWdodDo8L2R0PjxkZD4nICsgcmVjdC5yaWdodCArICc8L2RkPicgKwog
ICAgICAgICAgICAgICAgJzxkdD5ib3R0b206PC9kdD48ZGQ+JyArIHJlY3QuYm90dG9tICsgJzwv
ZGQ+JyArCiAgICAgICAgICAgICAgICAnPGR0PmxlZnQ6PC9kdD48ZGQ+JyArIHJlY3QubGVmdCAr
ICc8L2RkPicpOwogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgfSk7CiAgICB9Cgog
ICAgJChmdW5jdGlvbigpIHsKICAgICAgZGVtbygnI2RlbW8xJywgJzxzZWN0aW9uIGlkPSJkeW5h
bWljX3N1cmZhY2UiPjxpbnB1dCB0eXBlPSJ0ZXh0IiAvPjwvc2VjdGlvbj4nKTsKICAgICAgZGVt
bygnI2RlbW8yJywgJzxzZWN0aW9uIGlkPSJkeW5hbWljX3N1cmZhY2UiPjxpbnB1dCB0eXBlPSJ0
ZXh0IiBhdXRvZm9jdXMgLz48L3NlY3Rpb24+Jyk7CiAgICB9KTsKICA8L3NjcmlwdD4KPC9ib2R5
Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>