New issue
Advanced search Search tips

Issue 829396 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

chrome.ime.sendKeyEvents does not accept real KeyboardEvents

Project Member Reported by bcmi...@google.com, Apr 5 2018

Issue description

Chrome Version: 65.0.3325.184 (Official Build) (64-bit)
OS: ChromeOS 10323.62.0 (Official Build) stable-channel panther

What steps will reproduce the problem?

(1) In the onKeyEvent handler of a ChromeOS IME extension, construct a new KeyboardEvent object using the incoming KeyboardEvent as a prototype:
https://github.com/bcmills/extra-keyboards-for-chrome-os/blob/221234160dd0071b27a4ca4d02fefd46dbf1a02d/composekey/background.js#L1041-L1050

(2) Pass the new KeyboardEvent to chrome.ime.sendKeyEvents.
(https://screenshot.googleplex.com/t96YCqWYNO3)
(https://screenshot.googleplex.com/ZWnit4Y9s4z)


What is the expected result?
The KeyboardEvent is successfully processed per the documentation.


What happens instead?
```
_generated_background_page.html:1 Error in event handler for input.ime.onKeyEvent: Error: Invalid value for argument 1. Property 'keyData.0.requestId': Property is required, Property 'keyData.0.isTrusted': Unexpected property, Property 'keyData.1.requestId': Property is required, Property 'keyData.1.isTrusted': Unexpected property.
    at Result.send (chrome-extension://nmonfkolkngpgmgiiknbloafmidlllak/background.js:1044:22)
    at chrome.input.ime.onKeyEvent.addListener (chrome-extension://nmonfkolkngpgmgiiknbloafmidlllak/background.js:1650:19)
```
 
Owner: shuchen@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment