<?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>150715</bug_id>
          
          <creation_ts>2015-10-30 01:17:56 -0700</creation_ts>
          <short_desc>Excessive enforced zoom when body is short and overflow:hidden (new iOS 9 breakage)</short_desc>
          <delta_ts>2016-08-29 23:50:09 -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 9</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 9.0</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>152803</dup_id>
          
          <bug_file_loc>http://output.jsbin.com/sagowo</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>159753</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jacob</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1137829</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-10-30 01:17:56 -0700</bug_when>
    <thetext>Steps to reproduce:
1. Open http://output.jsbin.com/sagowo in iOS 9 Safari.
2. Tap the blue button to make the Bootstrap modal dialog appear.

Actual result:
In iOS 9, some kind of automatic zooming kicks in and the page gets *way* too zoomed in
(e.g. an &lt;input&gt; takes up ~1/4th of the vertical space of the viewport),
and there&apos;s no way to zoom out, even though user-scalable=no has NOT been specified.

Expected result:
Either no extra zoom or a reasonable amount of zoom should be applied.

Other notes:
This used to work fine in iOS 8.4.
iOS 9 has caused this to break somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1138177</commentid>
    <comment_count>1</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2015-10-31 11:16:49 -0700</bug_when>
    <thetext>Similar to &lt;http://wkbug.com/146244&gt;, this is related to how the &lt;body&gt; height is being computed as a very small value. This can be verified in jsbin test case by putting height: 100vh on the &lt;body&gt; and seeing that the excessive zoom doesn&apos;t occur.

It would be useful to know what heights Chrome and Firefox on mobile compute for the &lt;body&gt; element. On desktop, Safari, Chrome and Firefox all compute the body height to be about 46px, so I would guess it&apos;s the same for mobile, but it would definitely be good to double check.

I suppose a temporary workaround for both this issue and &lt;http://wkbug.com/146244&gt; is forcing the body element to cover the page, but for an actual fix, we need to know whether having a tiny/very short &lt;body&gt; is something we should support. If not, we need to figure out what&apos;s causing us to compute body height to be such a small value; otherwise, we&apos;ll need to adjust the way we handle various iOS-specific behaviors (e.g. zooming and input assistance) to do the right thing even when the body element is tiny.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1138183</commentid>
    <comment_count>2</comment_count>
      <attachid>264481</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2015-10-31 12:06:30 -0700</bug_when>
    <thetext>Created attachment 264481
Reduced test case (standalone html)

The problem with the Bootstrap modals is reproducible by doing two things without using Bootstrap or jQuery:

1. Set a small (~50px) height on the &lt;body&gt;
2. Set overflow: hidden on the &lt;body&gt;

Observe that we start zoomed in to the text at max scale, and there&apos;s no way to zoom out. Again, we have to figure out if we&apos;re computing the height correctly, and if so, we&apos;ll need to make our zooming heuristic account for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1138188</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-10-31 12:53:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/23345731&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1138195</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-10-31 13:01:08 -0700</bug_when>
    <thetext>&gt; It would be useful to know what heights Chrome and Firefox on mobile compute for the &lt;body&gt; element.

For the Bootstrap example, with the modal opened, Android Chrome gives:
document.body.clientHeight: 46px
document.body.offsetHeight: 46px
document.body.scrollHeight: 1396px</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1138208</commentid>
    <comment_count>5</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2015-10-31 14:58:52 -0700</bug_when>
    <thetext>
&gt; document.body.clientHeight: 46px
&gt; document.body.offsetHeight: 46px

Thanks for the fast response! I&apos;m observing the same thing on mobile Safari. It looks like the tiny &lt;body&gt; height might not be so crazy after all, and WebKit should handle this case in a better way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153666</commentid>
    <comment_count>6</comment_count>
    <who name="Jacob">jacob</who>
    <bug_when>2016-01-07 16:03:27 -0800</bug_when>
    <thetext>For those looking to work around this issue:

html, body {
  height: 100%;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153669</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2016-01-07 16:13:44 -0800</bug_when>
    <thetext>Fixed via bug 152803.

*** This bug has been marked as a duplicate of bug 152803 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153721</commentid>
    <comment_count>8</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-01-07 18:17:46 -0800</bug_when>
    <thetext>Wonderful!
Removed the entry from Bootstrap&apos;s wall: https://github.com/twbs/bootstrap/commit/48e62fdf34c6f2a0a5c559e9b5e8318b7d86e654</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>264481</attachid>
            <date>2015-10-31 12:06:30 -0700</date>
            <delta_ts>2015-10-31 12:06:30 -0700</delta_ts>
            <desc>Reduced test case (standalone html)</desc>
            <filename>overflow-zoom-bug.html</filename>
            <type>text/html</type>
            <size>355</size>
            <attacher name="Wenson Hsieh">wenson_hsieh</attacher>
            
              <data encoding="base64">PG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoID0gZGV2aWNlLXdpZHRoIj4KPHN0
eWxlPgogICAgYm9keSB7CiAgICAgICAgaGVpZ2h0OiA1MHB4OyAvKiBSZW1vdmluZyB0aGlzIG1h
a2VzIHVzIG5vdCB6b29tIGluIGFsbCB0aGUgd2F5LiAqLwogICAgICAgIG92ZXJmbG93OiBoaWRk
ZW47IC8qIFJlbW92aW5nIHRoaXMgbWFrZXMgdXMgbm90IHpvb20gaW4gYWxsIHRoZSB3YXkuICov
CiAgICB9Cjwvc3R5bGU+Cgo8Ym9keT4KICAgIDxwPldlJ3JlIHpvb21lZCBpbiBhbGwgdGhlIHdh
eSBmb3Igbm8gYXBwYXJlbnQgcmVhc29uLCBhbmQgdGhlcmUncyBubyB3YXkgdG8gem9vbSBvdXQh
PC9wPgo8L2JvZHk+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>