<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - UIViewController with WkWebView presented modally causes the presented UIViewController to be dismissed."
   href="https://bugs.webkit.org/show_bug.cgi?id=165225#c20">Comment # 20</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - UIViewController with WkWebView presented modally causes the presented UIViewController to be dismissed."
   href="https://bugs.webkit.org/show_bug.cgi?id=165225">bug 165225</a>
              from <span class="vcard"><a class="email" href="mailto:bwright2&#64;apple.com" title="Brad Wright &lt;bwright2&#64;apple.com&gt;"> <span class="fn">Brad Wright</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=165225#c17">comment #17</a>)
<span class="quote">&gt; Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=302902&amp;action=diff" name="attach_302902" title="Patch">attachment 302902</a> <a href="attachment.cgi?id=302902&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=302902&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=302902&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:583
&gt; &gt; +    _presentationViewController = nil;
&gt; 
&gt; I don't think there's any purpose in keeping the _presentationViewController
&gt; ivar if it's going to be nil in all circumstances outside of this method. Is
&gt; this approach any different than just removing
&gt; 
&gt;     if (_presentationViewController) {
&gt;         [_presentationViewController dismissViewControllerAnimated:animated
&gt; completion:^{
&gt;             _presentationViewController = nil;
&gt;         }];
&gt;     }
&gt; 
&gt; in -_dismissDisplayAnimated:?</span >

I found that the _presentationViewController should not be removed.  I went down the path of removing it, and found that it potentially needed in the class's dismiss routine which was being called externally.  I found that the much easier solution was to simply set the _presentationViewController to nil when the UIDocumentMenuViewController controller was being presented.  Overall, this makes the proposed changes much smaller.  It reduces the risk of any regression bugs from this change.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>