Bug 189388

Summary: [iOS] Add test to ensure that arrow keys dispatch DOM events to editable elements
Product: WebKit Reporter: Daniel Bates <dbates>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, lforschler, megan_gardner, rniwa, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://unixpapa.com/js/testkey.html
See Also: https://bugs.webkit.org/show_bug.cgi?id=189325
https://bugs.webkit.org/show_bug.cgi?id=189389
Bug Depends on:    
Bug Blocks: 190571    
Attachments:
Description Flags
Layout test none

Description Daniel Bates 2018-09-06 17:27:37 PDT
uiController.typeCharacterUsingHardwareKeyboard("leftArrow", ...) and similar invocations for other arrow keys inside a focused input field does cause DOM Keyup events to be dispatched.
Comment 1 Daniel Bates 2018-09-07 13:59:50 PDT
(In reply to Daniel Bates from comment #0)
> uiController.typeCharacterUsingHardwareKeyboard("leftArrow", ...) and
> similar invocations for other arrow keys inside a focused input field does
> cause DOM Keyup events to be dispatched.

*does not cause DOM Keyup events to be dispatched.
Comment 2 Daniel Bates 2018-09-07 14:45:50 PDT
Actually, I can reproduce this issue in Mobile Safari using focusing the text area on <https://unixpapa.com/js/testkey.html> and pressing the arrow keys on the keyboard. That is, no DOM events are dispatched. Therefore, this issue is not specific to test infrastructure.
Comment 3 Daniel Bates 2018-09-07 15:24:55 PDT
Created attachment 349205 [details]
Layout test
Comment 4 Daniel Bates 2018-09-07 15:27:46 PDT
Using the attached layout test (attachment #349205 [details]) we only seem to dispatch a keyup and keydown for the arrow up key (why?). The test times out as a result of waiting for keyup and keydown events for other arrows keys.
Comment 5 Radar WebKit Bug Importer 2018-09-19 01:54:22 PDT
<rdar://problem/44595087>
Comment 6 Daniel Bates 2018-09-26 15:24:27 PDT
<rdar://problem/41108013>