New issue
Advanced search Search tips

Issue 851493 link

Starred by 3 users

Issue metadata

Status: Assigned
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Sign in to add a comment

User gesture context is not passed via MessageChannel

Project Member Reported by, Jun 11

Issue description

Chrome Version: 67.0.3396.79 
OS: macOS Siera 10.13.3 

What steps will reproduce the problem?
(1) Open
(2) Click on "Channel message" button.

What is the expected result?

Popup is opened.

What happens instead?

Observe that the popup is blocked. Also observe that clicking on "Window message" opens popup as expected.


The user gesture context is propagated via a window "message" event, but is NOT propagated via a MessageChannel event. Not sure if this is a part of any spec, but it seems counter-intuitive since MessageChannel is essentially the same API. There might be questions of whether the user gesture context should be propagated to Web Workers, etc, but as far as cross-window propagation, I believe it should.

Components: Blink>Input
Labels: UserActivation
Status: Assigned (was: Untriaged)
Just confirmed that the repro works fine when UAv2 is enabled on ToT (through --enable-features=UserActivationV2), yayy!  This is because UAv2 doesn't require activation token passing unlike the old code.

dvoytenko@: is it something you want to get fixed soon?  If not, I will just keep this bug "parked" in my name until UAv2 ships in a few releases.
Great! Not urgent then.
I submitted a PR to WPT to test this behavior: (for some reason the bug is only exhibited when clicking manually on the buttons, not when using testdriver's click emulation).
fwang@: Curious about the "click not working with testdriver": is it only for the MessageChannel part of your test (vs both postMssage and MessageChannel)?

mustaq@ Apparently WPT runner explicitly disables popup blocking. Also, as I commented on the github PR, testdriver does not support clicking a button inside an iframe as in Dima's testcase. So unfortunately, I suspect the best we can do in WPT are manual tests and we would need to write automated versions for Chromium's repo anyway.

Sign in to add a comment