Tapping media controls should dismiss the overflow menu |
||||||||||||
Issue descriptionVersion: 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
,
Oct 11 2016
,
Oct 11 2016
,
Oct 11 2016
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?
,
Oct 12 2016
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.
,
Oct 12 2016
I have a hotfix for this: https://codereview.chromium.org/2414653002/ It's not perfect but it is working for now at least.
,
Oct 13 2016
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.
,
Oct 15 2016
Thanks zqzhang@! Let's land your fix and see later how we can improve the architecture.
,
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
,
Oct 15 2016
,
Oct 16 2016
Your change meets the bar and is auto-approved for M55 (branch: 2883)
,
Oct 17 2016
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.
,
Oct 17 2016
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
,
Oct 17 2016
,
Oct 17 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
,
Oct 27 2016
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
,
Nov 4 2016
[Automated comment] removing mislabelled merge-merged-2840
,
Nov 4 2016
[Automated comment] removing mislabelled merge-merged-2840 |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by mlamouri@chromium.org
, Oct 11 2016