New issue
Advanced search Search tips

Issue 799471 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 780166
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Keyboard events not triggered in window containing a webview

Reported by jason.so...@gmail.com, Jan 5 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Platform: 10032.75.0 (Official Build) stable-channel cyan

Steps to reproduce the problem:
1. Install Sample Test Kiosk App (https://chrome.google.com/webstore/detail/sample-test-kiosk-app/ncenilcnagcpbdfdiaplnmlcajlblnmn)
2. Start app and inspect windows with chrome://inspect
Note two windows :
(1) chrome-extension://ncenilcnagcpbdfdiaplnmlcajlblnmn/browser.html
	(2) https://www.google.com
Window 1 is the app window that contains the webview (window 2)
3. Inspect Window 1 and add an Event Listener Breakpoint for keyboard events
4. Add an event listener to the window for keydown events :
window.addEventListener("keydown", function(e) { console.log(e);});
5. Go to the app window and press a key

What is the expected behavior?
The registered event handler function would be fired.  Note this works fine in Chrome 62 but not in Chrome 61 or 63+

What went wrong?
The event handler function is not fired

Did this work before? Yes 62.0.3202.97

Does this work in other browsers? N/A

Chrome version: 63.0.3239.116  Channel: stable
OS Version: 63.0.3239.116
Flash Version: 

The event handler function was being triggered fine up until Chrome 61.  We reported the defect here :
https://bugs.chromium.org/p/chromium/issues/detail?id=780166

The event handler function was being triggered fine up until Chrome 61.  We reported the defect here (since closed due to this working in 62) :

https://bugs.chromium.org/p/chromium/issues/detail?id=780166

It appears that in Chrome 62, something changed again so this was working again.  Now in Chrome 63 and above, it's not working again.  Here are the versions I tried :

Working as expected :
Version 62.0.3202.97 (Official Build) (32-bit)
Platform
9901.77.0 (Official Build) stable-channel veyron_minnie
Firmware
Google_Veyron_Minnie.6588.237.0

Not working as expected :
Version 63.0.3239.116 (Official Build) (64-bit)
Platform
10032.75.0 (Official Build) stable-channel cyan
Firmware
Google_Cyan.7287.57.137

Version 64.0.3282.41 (Official Build) beta (64-bit)
Platform
10176.22.0 (Official Build) beta-channel cyan
Firmware
Google_Cyan.7287.57.145

Note that if you press a keyboard key while the focus is outside the webview (tabbing through the top control bar is the easiest example) that the events fire as expected.  This only happens if you have registed an event listener for keyboard events however, but I'm assuming that is just how the Event Listener Breakpoints work.

Should keyboard events be propagated to the containing window?  In Chrome 62 and prior to Chrome 61, we would receive the keydown events in the outer window.  It stopped working in Chrome 61 and Chrome 63+ with no changes to our app.
 
Cc: dtapu...@chromium.org
Mergedinto: 780166
Status: Duplicate (was: Unconfirmed)
Dupe-ing back into the original bug

Sign in to add a comment