<?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>250927</bug_id>
          
          <creation_ts>2023-01-20 19:58:31 -0800</creation_ts>
          <short_desc>iPhone: Inserting text causes other text to become bigger</short_desc>
          <delta_ts>2023-01-27 19:59:16 -0800</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 16</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Šime Vidas">sime.vidas</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>brandonstewart</cc>
    
    <cc>ik</cc>
    
    <cc>karlcow</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>1927067</commentid>
    <comment_count>0</comment_count>
    <who name="Šime Vidas">sime.vidas</who>
    <bug_when>2023-01-20 19:58:31 -0800</bug_when>
    <thetext>Steps to reproduce:

1. Use an iPhone
2. Open this page: https://output.jsbin.com/mojogas/quiet
3. Tap the “Insert text” button

What happened:

The text became larger. This only happens on iOS. This does not happen in Android browsers.

Full source code of linked test page:

&lt;!DOCTYPE html&gt;

&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
    &lt;title&gt;test page&lt;/title&gt;
    &lt;style&gt;
      .wrapper {
        display: grid;
        overflow-x: auto;
      }

      .wrapper &gt; * {
        min-height: 1.35em;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;

    &lt;div class=&quot;wrapper&quot;&gt;
      &lt;div&gt;Test&lt;/div&gt;
      &lt;div id=elem&gt;&lt;/div&gt;
      &lt;img src=&quot;https://placekitten.com/640/320&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;
      &lt;button onclick=&quot;elem.textContent = &apos;Test&apos;&quot;&gt;
        Insert text
      &lt;/button&gt;
    &lt;/p&gt;

  &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927075</commentid>
    <comment_count>1</comment_count>
    <who name="Šime Vidas">sime.vidas</who>
    <bug_when>2023-01-20 20:19:24 -0800</bug_when>
    <thetext>Another thing I noticed is that if you restrict the width of the first two grid items (the ones that contain “Test”), the issue does not occur.

It seems that the issue has something to do with the grid items being very wide (in my case, 640px wide), although that doesn’t explain why the issue only occurs when there are more than one grid item with text.

Added CSS that makes the issue go away:

.wrapper &gt; :not(:last-child) {
  width: 4ch;
}

Test page with added CSS: https://output.jsbin.com/rijariw/quiet</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927364</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-01-22 18:05:59 -0800</bug_when>
    <thetext>Thanks a lot Šime.
I wonder if there is a WPT already covering this or if one is needed. 

The font size jumps from 16px to 23px.
After deactivating grid, the issue doesn&apos;t reproduce.

But as soon I reactivate grid, the font jumps to 23px again.

That looks like a bug indeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929117</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-27 19:59:16 -0800</bug_when>
    <thetext>&lt;rdar://problem/104772244&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>