<?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>224274</bug_id>
          
          <creation_ts>2021-04-07 01:49:27 -0700</creation_ts>
          <short_desc>window.closed of opened window remains false when it is closed in standalone mode</short_desc>
          <delta_ts>2022-02-10 11:39:21 -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>DOM</component>
          <version>Safari 14</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</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>chenhaoftk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>david_quesada</cc>
    
    <cc>smoley</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1747815</commentid>
    <comment_count>0</comment_count>
    <who name="">chenhaoftk</who>
    <bug_when>2021-04-07 01:49:27 -0700</bug_when>
    <thetext>Minimal repro: https://wuchenhao.github.io/open-window/index.html

Symptom: when a window is opened from standalone mode, its `closed` property is not updated to `true` when the window is closed.

Repro steps:
  1. Visit above URL on iPhone
  2. Add the page to home screen
  3. Open the page from home screen (page should be opened in standalone mode)
  4. Click the &quot;Open Window&quot; button. A blank page should be opened.
  5. Close the blank page. Observe that there is no alert window showing up - indicating that `window.closed` remains `false`.

Additional information:
  1. The issue only exists in iOS standalone mode. Also Mac Safari doesn&apos;t exhibit this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1747816</commentid>
    <comment_count>1</comment_count>
    <who name="">chenhaoftk</who>
    <bug_when>2021-04-07 01:51:43 -0700</bug_when>
    <thetext>I would expect that `window.closed` is set to `true` after the window is closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748007</commentid>
    <comment_count>2</comment_count>
    <who name="Smoley">smoley</who>
    <bug_when>2021-04-07 12:16:12 -0700</bug_when>
    <thetext>Thanks for filing, this worked as expected as recently as iOS 14.2.1. I can reproduce this issue on the latest iOS 14.5 beta.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748008</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-07 12:16:25 -0700</bug_when>
    <thetext>&lt;rdar://problem/76359684&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748250</commentid>
    <comment_count>4</comment_count>
    <who name="">chenhaoftk</who>
    <bug_when>2021-04-08 03:25:50 -0700</bug_when>
    <thetext>Thanks! Also this issue can only be reproduced on real phones. Simulators do not have this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748852</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-04-09 13:52:17 -0700</bug_when>
    <thetext>It appears the bug in not in WebKit but in SafariViewController. The radar has been forwarded to the SafariViewController team. Closing this WebKit bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1839852</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-02-10 11:39:21 -0800</bug_when>
    <thetext>This should now be fixed in shipping software.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>