Bug 193255 - [iOS] Command + . key events to non-editable elements have incorrect key details
Summary: [iOS] Command + . key events to non-editable elements have incorrect key details
Status: RESOLVED DUPLICATE of bug 192824
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL: https://unixpapa.com/js/testkey.html
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 190571
  Show dependency treegraph
 
Reported: 2019-01-08 14:30 PST by Daniel Bates
Modified: 2019-01-09 15:02 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2019-01-08 14:30:23 PST
Seen on iOS using a hardware keyboard.

Steps to reproduce:

1. Visit <https://unixpapa.com/js/testkey.html>.
2. Ensure Modifiers and DOM 3 attribute values are enabled.
3. Press Command + . on the keyboard.

Then the properties keyCode, which, charCode and key have values 85, 85, 85, and UIKeyInputEscape, respectively. But the values of these properties should be 27, 27, 0, and Escape, respectively to match Mac.
Comment 1 Radar WebKit Bug Importer 2019-01-08 16:49:28 PST
<rdar://problem/47133149>
Comment 2 Daniel Bates 2019-01-09 14:58:23 PST
(In reply to Daniel Bates from comment #0)
> Seen on iOS using a hardware keyboard.
> 
> Steps to reproduce:
> 
> 1. Visit <https://unixpapa.com/js/testkey.html>.
> 2. Ensure Modifiers and DOM 3 attribute values are enabled.
> 3. Press Command + . on the keyboard.
> 
> Then the properties keyCode, which, charCode and key have values 85, 85, 85,
> and UIKeyInputEscape, respectively. But the values of these properties
> should be 27, 27, 0, and Escape, respectively to match Mac.

Actually, on Mac we do not convert Command + . to Escape.
Comment 3 Daniel Bates 2019-01-09 14:59:39 PST
(In reply to Daniel Bates from comment #0)
> Seen on iOS using a hardware keyboard.
> 
> Steps to reproduce:
> 
> 1. Visit <https://unixpapa.com/js/testkey.html>.
> 2. Ensure Modifiers and DOM 3 attribute values are enabled.
> 3. Press Command + . on the keyboard.
> 
> Then the properties keyCode, which, charCode and key have values 85, 85, 85,
> and UIKeyInputEscape, respectively. But the values of these properties
> should be 27, 27, 0, and Escape, respectively to match Mac.

The expected output should be:

keydown  keyCode=91  ([)   which=91  ([)   charCode=0        
         shiftKey=false ctrlKey=false altKey=false metaKey=true 
         key=Meta char=undefined location=1 repeat=false
keydown  keyCode=190       which=190       charCode=0        
         shiftKey=false ctrlKey=false altKey=false metaKey=true 
         key=. char=undefined location=0 repeat=false
keyup    keyCode=91  ([)   which=91  ([)   charCode=0        
         shiftKey=false ctrlKey=false altKey=false metaKey=false
         key=Meta char=undefined location=1 repeat=false
Comment 4 Daniel Bates 2019-01-09 15:02:08 PST
This will be fixed in as a side effect of fixing bug #192824 and using the same code path for both hardware key presses in non-editable elements as we do for hardware key presses in editable elements.

*** This bug has been marked as a duplicate of bug 192824 ***