New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654637 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Tapping media controls should dismiss the overflow menu

Project Member Reported by k...@chromium.org, Oct 11 2016

Issue description

Version: 55
OS: Android

What steps will reproduce the problem?
(1) View media player with overflow menu (e.g. 200px width)
(2) Open overflow menu
(3) Tap play (either overlay or main toolbar button)

What is the expected output?

Overflow menu is dismissed

What do you see instead?

Overflow menu remains open
 
Owner: zqzh...@chromium.org
Zhiqiang, can you have a look?
Labels: M-55
Status: Started (was: Assigned)
I found the problem:
There are a handful of MediaControlElements overriding EventTarget::keepEventInNode(). Thus the event is trapped into these elements and not passed to the Window.

Maybe we could add more listeners to these event-trapping nodes, but I think maybe we should have the least number of elements trapping click events, so we don't register too many listeners. Mounir, WDYT?
Cc: zqzh...@chromium.org
Labels: -M-55 M-56
Owner: ----
Status: Available (was: Started)
Thanks for having a look :) It's indeed not a trivial fix. I'm not sure how to do this without adding a lot of code everywhere to special-case this situation. Maybe one solution is to always hide the menu when one of the controls is clicked and never hide it via the window click event if the <video> is targeted.

Regardless, it seems that we might not have to fix this for M55 so I will have a look this quarter.
I have a hotfix for this:
https://codereview.chromium.org/2414653002/

It's not perfect but it is working for now at least.
Also, I see EventTarget::keepEventInNode() is only used in MediaControlElements. Maybe we could remove that keepEventInNode() and use Event::stopPropagation()? Not 100% sure if they are the same thing.
Cc: -zqzh...@chromium.org
Labels: -M-56 M-55
Owner: zqzh...@chromium.org
Status: Started (was: Available)
Thanks zqzhang@! Let's land your fix and see later how we can improve the architecture.
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29

commit 9e83c349b6790b8b5514cc40df8c7be4cf4f2e29
Author: zqzhang <zqzhang@chromium.org>
Date: Sat Oct 15 21:16:37 2016

[MediaControls] Hide overflow menu and closed caption list when clicking on some MediaControl elements

Some MediaControl elements trap click events and prevent the event being fired
on parent elements. This CL adds additional EventHandlers to these
event-trapping elements to hide MediaControls correctly.

BUG= 654637 

Review-Url: https://codereview.chromium.org/2414653002
Cr-Commit-Position: refs/heads/master@{#425573}

[add] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click-panel.html
[modify] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/Source/core/html/shadow/MediaControls.h
[modify] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp

Labels: Merge-Request-55

Comment 11 by dimu@chromium.org, Oct 16 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Please merge your change to M55 branch 2883 before 4:00 PM PT, Monday (10/17/16) in order to make to last M55 dev release before Beta promotion. Thank you.
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 17 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa

commit b1323fabcc17a3d234eedfb2039ddb474a5aa4aa
Author: Zhiqiang Zhang <zqzhang@google.com>
Date: Mon Oct 17 09:32:30 2016

[MediaControls] Hide overflow menu and closed caption list when clicking on some MediaControl elements

Some MediaControl elements trap click events and prevent the event being fired
on parent elements. This CL adds additional EventHandlers to these
event-trapping elements to hide MediaControls correctly.

BUG= 654637 

Review-Url: https://codereview.chromium.org/2414653002
Cr-Commit-Position: refs/heads/master@{#425573}
(cherry picked from commit 9e83c349b6790b8b5514cc40df8c7be4cf4f2e29)

Review URL: https://codereview.chromium.org/2427543002 .

Cr-Commit-Position: refs/branch-heads/2883@{#138}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[add] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click-panel.html
[modify] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/Source/core/html/shadow/MediaControls.h
[modify] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp

Status: Fixed (was: Started)
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 17 2016

Labels: merge-merged-2892
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29

commit 9e83c349b6790b8b5514cc40df8c7be4cf4f2e29
Author: zqzhang <zqzhang@chromium.org>
Date: Sat Oct 15 21:16:37 2016

[MediaControls] Hide overflow menu and closed caption list when clicking on some MediaControl elements

Some MediaControl elements trap click events and prevent the event being fired
on parent elements. This CL adds additional EventHandlers to these
event-trapping elements to hide MediaControls correctly.

BUG= 654637 

Review-Url: https://codereview.chromium.org/2414653002
Cr-Commit-Position: refs/heads/master@{#425573}

[add] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click-panel.html
[modify] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/Source/core/html/shadow/MediaControls.h
[modify] https://crrev.com/9e83c349b6790b8b5514cc40df8c7be4cf4f2e29/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa

commit b1323fabcc17a3d234eedfb2039ddb474a5aa4aa
Author: Zhiqiang Zhang <zqzhang@google.com>
Date: Mon Oct 17 09:32:30 2016

[MediaControls] Hide overflow menu and closed caption list when clicking on some MediaControl elements

Some MediaControl elements trap click events and prevent the event being fired
on parent elements. This CL adds additional EventHandlers to these
event-trapping elements to hide MediaControls correctly.

BUG= 654637 

Review-Url: https://codereview.chromium.org/2414653002
Cr-Commit-Position: refs/heads/master@{#425573}
(cherry picked from commit 9e83c349b6790b8b5514cc40df8c7be4cf4f2e29)

Review URL: https://codereview.chromium.org/2427543002 .

Cr-Commit-Position: refs/branch-heads/2883@{#138}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[add] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click-panel.html
[modify] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/Source/core/html/shadow/MediaControls.h
[modify] https://crrev.com/b1323fabcc17a3d234eedfb2039ddb474a5aa4aa/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp

Comment 17 by dimu@google.com, Nov 4 2016

[Automated comment] removing mislabelled merge-merged-2840

Comment 18 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment