Bug 209613

Summary: Unable to present file upload picker after interactively dismissing a previously opened picker
Product: WebKit Reporter: David Quesada <david_quesada>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description David Quesada 2020-03-26 12:28:03 PDT
- Present a file upload picker for a file <input> on iOS.
- Dismiss the picker by swiping down on it.
- Attempt to open the file picker again.
(Expected: I can open the file picker)
(Actual result: Nothing happens)

Extra credit:
- Cause the web view to be deallocated (e.g. close a browser tab)
(Expected: Nothing interesting happens)
(Actual result: The app crashes due an exception in +[UIViewController _viewControllerForFullScreenPresentationFromView:] because the 'view' parameter nil. This is hit while trying to dismiss the file upload panel, which the WKContentView still thinks is presented.)
Comment 1 Radar WebKit Bug Importer 2020-03-26 12:28:36 PDT
<rdar://problem/60931009>
Comment 2 David Quesada 2020-03-26 15:00:38 PDT
Created attachment 394660 [details]
Patch
Comment 3 Daniel Bates 2020-03-29 09:19:39 PDT
Comment on attachment 394660 [details]
Patch

This patch looks good. A better solution would include a test for this change or a test for the crash (or both). I think it's testable from layout tests. See internals.cpp
Comment 4 EWS 2020-07-23 13:16:55 PDT
Committed r264785: <https://trac.webkit.org/changeset/264785>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394660 [details].