<?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>225354</bug_id>
          
          <creation_ts>2021-05-04 07:36:17 -0700</creation_ts>
          <short_desc>iOS 14.5 Regression CSS Variable updates are not rendered in Shadow DOM</short_desc>
          <delta_ts>2021-05-20 03:54:49 -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 14</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>224261</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>
          
          <blocked>148695</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Liam DeBeasi">ldebeasi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>mdiera.dvk</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tobbi1993</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1756527</commentid>
    <comment_count>0</comment_count>
      <attachid>427663</attachid>
    <who name="Liam DeBeasi">ldebeasi</who>
    <bug_when>2021-05-04 07:36:17 -0700</bug_when>
    <thetext>Created attachment 427663
Code Reproduction

When changing the value of a CSS Variable on a Web Component using Shadow DOM, WebKit does not always render this updated variable value.

Steps to reproduce:

1. Open attached code reproduction on Safari 14.1 (macOS or iOS 14.5 works).
2. On the left you should see a Web Component that says &quot;My Button&quot;. On the right you should see a button that says &quot;Toggle Disabled&quot;.
3. Tap the &quot;Toggle Disabled&quot; button. This will set the `disabled` attribute on the Web Component. Observe that the background color of the Web Component changes to gray, but the text color remains the same.

Repeat these steps on iOS 14.4 and you should notice that the text color becomes red when tapping the &quot;Toggle Disabled&quot; button.

Expected Behavior:

I would expect that the Web Component text color becomes red.

Actual Behavior:

The Web Component text color remains dark gray.

Other Information:

- iOS 14.4 and older are working as expected.
- This issue does not reproduce on Chrome 90 or Firefox 88.
- Removing &quot;pointer-events&quot; from the host styles causes the rendering to work as expected.
- When evaluating the value of `--color` in Safari Dev Tools on the `button` element inside of the shadow root, the value is correctly evaluated to &quot;red&quot;, but the text color remains rendered as dark gray.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756567</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-05-04 09:59:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/77511775&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756803</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-05-04 22:19:24 -0700</bug_when>
    <thetext>Hmm, works with trunk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756846</commentid>
    <comment_count>3</comment_count>
    <who name="Tobias Trumm">tobbi1993</who>
    <bug_when>2021-05-05 01:21:49 -0700</bug_when>
    <thetext>I am also seeing this issue (color in button not updated correctly) without using shadow DOM. Here is an example: https://codepen.io/wistudent/pen/xxqKdMQ

I can see in the inspector that the color property of the element is changed, but the color change is not rendered. I am having this issue on iOS 14.5.1 and macOS Safari 14.1 (16611.1.21.161.3)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756850</commentid>
    <comment_count>4</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-05-05 01:32:03 -0700</bug_when>
    <thetext>This was fixed in https://commits.webkit.org/r275607

*** This bug has been marked as a duplicate of bug 224261 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756857</commentid>
    <comment_count>5</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-05-05 01:40:08 -0700</bug_when>
    <thetext>Right, Shadow DOM and variables are incidental here. The issue is with paint invalidation in presence of pointer-events property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1757048</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-05-05 12:46:18 -0700</bug_when>
    <thetext>Could you comment as to what kind of popular sites or frameworks are affected by this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1757377</commentid>
    <comment_count>7</comment_count>
    <who name="Liam DeBeasi">ldebeasi</who>
    <bug_when>2021-05-06 06:13:18 -0700</bug_when>
    <thetext>Currently this impacts our button component in Ionic Framework: https://github.com/ionic-team/ionic-framework/issues/23256.

I have not received reports of this impacting production Ionic Framework apps, though I imagine I will receive more reports as people upgrade to iOS 14.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1758003</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-05-07 14:29:07 -0700</bug_when>
    <thetext>(In reply to Liam DeBeasi from comment #7)
&gt; Currently this impacts our button component in Ionic Framework:
&gt; https://github.com/ionic-team/ionic-framework/issues/23256.
&gt; 
&gt; I have not received reports of this impacting production Ionic Framework
&gt; apps, though I imagine I will receive more reports as people upgrade to iOS
&gt; 14.5.

Thanks for the clarification!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1758019</commentid>
    <comment_count>9</comment_count>
    <who name="Tobias Trumm">tobbi1993</who>
    <bug_when>2021-05-07 14:56:06 -0700</bug_when>
    <thetext>Our app uses ionic&apos;s capacitor framework as a base and vue + vuetify as UI framework. We noticed this issue in our released app after updating to iOS 14.5. The hint about the pointer-events property helped us to find a css workaround that we will ship with our next app release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761126</commentid>
    <comment_count>10</comment_count>
    <who name="Manny Diera">mdiera.dvk</who>
    <bug_when>2021-05-18 04:30:07 -0700</bug_when>
    <thetext>Just encountered this issue and tried setting the pointer events to unset. 

This worked for the CSS issue but affected the event handling. We are thinking about either leaving the pointer-events as unset and use event delegation to handle the events or go through and find the CSS variable that is getting passed into the button and affecting the style. 

@Tobias Trumm - Were these the css workarounds that worked for you or is there something else you could recommend?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761127</commentid>
    <comment_count>11</comment_count>
    <who name="Manny Diera">mdiera.dvk</who>
    <bug_when>2021-05-18 04:31:03 -0700</bug_when>
    <thetext>(In reply to Tobias Trumm from comment #9)
&gt; Our app uses ionic&apos;s capacitor framework as a base and vue + vuetify as UI
&gt; framework. We noticed this issue in our released app after updating to iOS
&gt; 14.5. The hint about the pointer-events property helped us to find a css
&gt; workaround that we will ship with our next app release.


Just encountered this issue and tried setting the pointer events to unset. 

This worked for the CSS issue but affected the event handling. We are thinking about either leaving the pointer-events as unset and use event delegation to handle the events or go through and find the CSS variable that is getting passed into the button and affecting the style. 

@Tobias Trumm - Were these the css workarounds that worked for you or is there something else you could recommend?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761132</commentid>
    <comment_count>12</comment_count>
    <who name="Tobias Trumm">tobbi1993</who>
    <bug_when>2021-05-18 05:02:18 -0700</bug_when>
    <thetext>(In reply to Manny Diera from comment #11)
&gt; @Tobias Trumm - Were these the css workarounds that worked for you or is
&gt; there something else you could recommend?

Vuetify&apos;s button implementation does set &quot;pointer-event: none&quot; but does not rely on it for its event handling internally, so in our case setting 

.v-btn--disabled {
  pointer-events: unset !important;
  cursor: default;
}

was enough to restore the original look and behaviour.


Seeing that iOS 14.6 RC was just released, it might also be worth to check if this bug is already fixed there and if so, wait for its final release, instead of implementing your own event handling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761307</commentid>
    <comment_count>13</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-05-18 14:12:26 -0700</bug_when>
    <thetext>(In reply to Tobias Trumm from comment #12)
&gt; (In reply to Manny Diera from comment #11)
&gt; &gt; @Tobias Trumm - Were these the css workarounds that worked for you or is
&gt; &gt; there something else you could recommend?
&gt; 
&gt; Vuetify&apos;s button implementation does set &quot;pointer-event: none&quot; but does not
&gt; rely on it for its event handling internally, so in our case setting 
&gt; 
&gt; .v-btn--disabled {
&gt;   pointer-events: unset !important;
&gt;   cursor: default;
&gt; }
&gt; 
&gt; was enough to restore the original look and behaviour.
&gt; 
&gt; 
&gt; Seeing that iOS 14.6 RC was just released, it might also be worth to check
&gt; if this bug is already fixed there and if so, wait for its final release,
&gt; instead of implementing your own event handling.

It&apos;s not fixed in iOS 14.6 RC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761720</commentid>
    <comment_count>14</comment_count>
    <who name="Liam DeBeasi">ldebeasi</who>
    <bug_when>2021-05-19 14:59:33 -0700</bug_when>
    <thetext>This appears to be fixed in iOS 14.7 beta 1. Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761893</commentid>
    <comment_count>15</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-05-20 03:54:49 -0700</bug_when>
    <thetext>Thanks for confirming, the fix should indeed be there.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>427663</attachid>
            <date>2021-05-04 07:36:17 -0700</date>
            <delta_ts>2021-05-04 07:36:17 -0700</delta_ts>
            <desc>Code Reproduction</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>1890</size>
            <attacher name="Liam DeBeasi">ldebeasi</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGx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HJ1
Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgCiAgICAgICAgICAgIGNvbnN0IHJv
b3QgPSB0aGlzLmF0dGFjaFNoYWRvdyh7IG1vZGU6ICdvcGVuJyB9KTsKICAgICAgCiAgICAgICAg
ICAgIGNvbnN0IHN0eWxlcyA9IGAKICAgICAgICAgICAgICA8c3R5bGU+CiAgICAgICAgICAgICAg
ICA6aG9zdChbZGlzYWJsZWRdKSB7CiAgICAgICAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBu
b25lOwogICAgICAgICAgICAgICAgfQogICAgICAKICAgICAgICAgICAgICAgIGJ1dHRvbiB7CiAg
ICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1jb2xvcik7CiAgICAgICAgICAgICAgICAgIGJh
Y2tncm91bmQ6IHZhcigtLWJhY2tncm91bmQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAg
ICAgIDwvc3R5bGU+CiAgICAgICAgICAgIGA7CiAgICAgIAogICAgICAgICAgICByb290LmlubmVy
SFRNTCA9IGAKICAgICAgICAgICAgICAke3N0eWxlc30KICAgICAgICAgICAgICA8YnV0dG9uIHR5
cGU9ImJ1dHRvbiI+CiAgICAgICAgICAgICAgICA8c2xvdD48L3Nsb3Q+CiAgICAgICAgICAgICAg
PC9idXR0b24+CiAgICAgICAgICAgIGA7CiAgICAgICAgICB9ICAgCiAgICAgICAgICAKICAgICAg
ICAgIGdldCBkaXNhYmxlZCgpIHsKICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLmdldEF0
dHJpYnV0ZSgnZGlzYWJsZWQnKTsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09PSAndHJ1ZScg
PyB0cnVlIDogZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICAKICAgICAgICAgIHNldCBkaXNh
YmxlZCh2YWx1ZSkgewogICAgICAgICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgICAgICB0aGlz
LnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCB2YWx1ZSk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAg
ICAgICAgICAgICAgdGhpcy5yZW1vdmVBdHRyaWJ1dGUoJ2Rpc2FibGVkJywgdmFsdWUpOwogICAg
ICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICA8L3NjcmlwdD4KICA8L2JvZHk+
CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>