<?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>262212</bug_id>
          
          <creation_ts>2023-09-27 14:25:00 -0700</creation_ts>
          <short_desc>Web apps added to homescreen do not dynamically respect the OS appearance on change</short_desc>
          <delta_ts>2023-12-21 14:56:39 -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>Layout and Rendering</component>
          <version>Safari 17</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 17</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=259328</see_also>
          <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="lettini">mlettini</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>the.bull</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1980629</commentid>
    <comment_count>0</comment_count>
    <who name="lettini">mlettini</who>
    <bug_when>2023-09-27 14:25:00 -0700</bug_when>
    <thetext>We have a PWA that includes a site.manifest file which includes `display: standalone`. When added to a phone’s home screen, this display property renders the app as if it were a standalone application, with no Safari browser UI. This is all good and expected.

However, after adding to home screen, if your OS changes appearance between light and dark mode while the app is open, the app will not also dynamically change it’s appearance to match (even though the HTML and CSS are set up with explicit light and dark mode designs). The only solution is to completely close the app and reopen it, and then it will be in the new OS appearance. This is unexpected, since both Safari websites and other native apps change their appearance dynamically to match the OS at the moment the OS’s appearance changes.

Steps to reproduce:

1. Have a web app that includes HTML and CSS necessary to have different appearances when prefers-color-scheme is light or dark mode.
2. Add a site.manifest file with the property `display: standalone` or `display: fullscreen` (may also need a `scope` property).
3. Add that web app to the home screen.
4. Open the app.
5. Using the iOS control center, change the appearance of the OS between light and dark mode. You will see that other apps change along with this toggle, while this PWA does not.

Possibly related to: https://bugs.webkit.org/show_bug.cgi?id=259328 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1980728</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-09-27 17:31:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/116150809&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2001455</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2023-12-21 14:56:39 -0800</bug_when>
    <thetext>The fix for this bug needs to be made outside of the WebKit Open Source project.

Resolving as MOVED.

This is being tracked here:
&lt;rdar://112872756&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>