Pressing the Escape key or Command + . should dismiss a picker or popover on iOS.
<rdar://problem/48943170>
Created attachment 366045 [details] Patch and layout test
Comment on attachment 366045 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=366045&action=review > Source/WebKit/UIProcess/ios/forms/WKFormPeripheralBase.mm:75 > + UIPhysicalKeyboardEvent *keyEvent = (UIPhysicalKeyboardEvent *)event; AccessoryDone can be called multiple times. Doesn't cause an issue, but would be better to only call it once. Moreover, control may want want to distinguish between key events when its UI is presented vs key events when its UI is not on screen (e.g. <select> still supports typeahead and arrow keys even when its picker/popover is not on screen). To support this, will add @property (nonatomic, readonly) editing; <--- kinda don't like this name, went with it to match naming of beginEditing and endEditing and since I toggle YES/NO for _editing in these functions. We will early return before this line if !_editing.
Created attachment 366184 [details] Patch and layout test
Comment on attachment 366184 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=366184&action=review > LayoutTests/fast/forms/ios/dismiss-picker-using-keyboard.html:72 > + UIHelper.keyDown("escape"); This should be: UIHelper.keyDown(keyCommand.key, modifiers=keyCommand.modifiers);
(In reply to Daniel Bates from comment #5) > Comment on attachment 366184 [details] > Patch and layout test > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366184&action=review > > > LayoutTests/fast/forms/ios/dismiss-picker-using-keyboard.html:72 > > + UIHelper.keyDown("escape"); > > This should be: > > UIHelper.keyDown(keyCommand.key, modifiers=keyCommand.modifiers); Python on the 🧠. Not likely valid JS, yet: UIHelper.keyDown(keyCommand.key, keyCommand.modifiers);
Created attachment 366186 [details] Patch and layout test
Created attachment 366216 [details] Patch and layout test
Comment on attachment 366216 [details] Patch and layout test Clearing flags on attachment: 366216 Committed r243808: <https://trac.webkit.org/changeset/243808>
All reviewed patches have been landed. Closing bug.