Pressing the arrow keys on a hardware keyboard in a focused text field does not dispatch DOM keyboard events. I observed this today on icloud.com. Here are the steps I performed: 1. Open an iPad simulator instance. 2. Visit https://www.icloud.com. 3. Tap the share button. Then tap Request Desktop Site from the share sheet. 4. Sign in to iCloud. 5. Tap Pages. 6. Tap the + icon at the top of the page to open the template chooser. 7. Press the right arrow key on the keyboard. Then nothing happens. But the Blank Landscape template should have been selected (visually indicated by having an orange outline wrapped around it).
Created attachment 349101 [details] Patch
We will need to fix bug #189388 in order to be able to write a test.
Comment on attachment 349101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349101&action=review > Source/WebCore/ChangeLog:16 > + Unfortunately I ran into <https://bugs.webkit.org/show_bug.cgi?id=189388> and hence could > + not write a test for this change. Should we fix that first so we can land with tests? > Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm:174 > + return "Unidentified"_s; That's a bit weird to have in production code. Maybe return empty string?
There is a related issue with regards to arrow keys and editable elements. See bug #189388.
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 349101 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=349101&action=review > > > Source/WebCore/ChangeLog:16 > > + Unfortunately I ran into <https://bugs.webkit.org/show_bug.cgi?id=189388> and hence could > > + not write a test for this change. > > Should we fix that first so we can land with tests? > Will fix this in bug #189432 and update this patch to include updated expected results for the test included in the patch for bug #189432. > > Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm:174 > > + return "Unidentified"_s; > > That's a bit weird to have in production code. Maybe return empty string? This is the correct behavior by <https://www.w3.org/TR/uievents-key/#key-Unidentified>.
Created attachment 349200 [details] To land after landing bug #189432
Committed r235860: <https://trac.webkit.org/changeset/235860>
<rdar://problem/44316290>