Summary: | [iOS] Should be able to dismiss picker or popover using the keyboard | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||
Component: | WebKit Misc. | Assignee: | Daniel Bates <dbates> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||||||||
Version: | WebKit Local Build | ||||||||||||
Hardware: | iPhone / iPad | ||||||||||||
OS: | iOS 12 | ||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=196287 https://bugs.webkit.org/show_bug.cgi?id=158327 |
||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 190571, 195819, 196360 | ||||||||||||
Attachments: |
|
Description
Daniel Bates
2019-03-26 14:57:13 PDT
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. |