Bug 199122

Summary: [iOS] Should not process key events in non-editable elements using IME
Product: WebKit Reporter: Daniel Bates <dbates>
Component: HTML EditingAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, jond, simon.fraser, 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=199472
Bug Depends on:    
Bug Blocks: 190571    
Attachments:
Description Flags
Patch none

Description Daniel Bates 2019-06-21 15:57:36 PDT
Attach Chinese/Japanese hardware keyboard.

Steps to reproduce:

1. Visit <https://unixpapa.com/js/testkey.html>
2. Press 'a'

You should see output like:

keydown  keyCode=65  (A)   which=65  (A)   charCode=0        
keypress keyCode=97  (a)   which=97  (a)   charCode=97  (a)  
keyup    keyCode=65  (A)   which=65  (A)   charCode=0        

But I see:

keydown  keyCode=229       which=229       charCode=0        
         shiftKey=false ctrlKey=false altKey=false metaKey=false
         key=a char=undefined location=0 repeat=false
keyup    keyCode=65  (A)   which=65  (A)   charCode=0        
         shiftKey=false ctrlKey=false altKey=false metaKey=false
         key=a char=undefined location=0 repeat=false
Comment 1 Radar WebKit Bug Importer 2019-06-21 16:03:42 PDT
<rdar://problem/52006654>
Comment 2 Daniel Bates 2019-06-21 16:48:58 PDT
Created attachment 372660 [details]
Patch
Comment 3 Brent Fulgham 2019-06-24 14:06:30 PDT
Comment on attachment 372660 [details]
Patch

Looks good -- now we match macOS behavior. r=me
Comment 4 Daniel Bates 2019-06-25 14:47:14 PDT
Comment on attachment 372660 [details]
Patch

Clearing flags on attachment: 372660

Committed r246810: <https://trac.webkit.org/changeset/246810>
Comment 5 Daniel Bates 2019-06-25 14:47:16 PDT
All reviewed patches have been landed.  Closing bug.