Summary: | A WKWebView in a UIViewController that is presented modally and uses a file picker will be incorrectly dismissed by the system | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zach Waugh <zwaugh> | ||||||||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | bdakin, commit-queue, obarnett, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | Safari 11 | ||||||||||||||
Hardware: | iPhone / iPad | ||||||||||||||
OS: | iOS 11 | ||||||||||||||
Attachments: |
|
Description
Zach Waugh
2018-05-03 10:00:19 PDT
*** This bug has been marked as a duplicate of bug 183549 *** I can't see the full details of the linked bug, but I don't believe they are the same issue. This bug report is concerning when the UIDocumentBrowserViewController is presented and subsequently dismissed. If you click through to this link (https://github.com/zachwaugh/wkwebview-bugs/tree/master/ModalFileDismissal), there is gif showing the full bug and it's unrelated to the action sheet. I've confirmed the bug is still present in iOS 12 beta 1 building against Xcode 10 beta 1. Interesting! I bet it has a similar fix, then. It does look like WKFileUploadPanel has the same bug. Created attachment 344211 [details]
Patch
Created attachment 344212 [details]
Patch
Comment on attachment 344212 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344212&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:288 > + [currentPresentedViewController dismissViewControllerAnimated:YES completion:nil]; I think you probably still want to clear _presentationViewController in the completion handler. Comment on attachment 344212 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344212&action=review >> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:288 >> + [currentPresentedViewController dismissViewControllerAnimated:YES completion:nil]; > > I think you probably still want to clear _presentationViewController in the completion handler. (Otherwise I think this is a leak?) Created attachment 344222 [details]
Patch
Comment on attachment 344222 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344222&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:288 > + [currentPresentedViewController dismissViewControllerAnimated:YES completion:^{_presentationViewController = nil; The first statement inside the block should be on the next line. Created attachment 344225 [details]
Patch
Comment on attachment 344225 [details] Patch Clearing flags on attachment: 344225 Committed r233502: <https://trac.webkit.org/changeset/233502> All reviewed patches have been landed. Closing bug. |