There is a way to add event listener to the Window object.
* If the user click on media controls, the controls will receive the click event first, and the Window receives it afterwards.
* If the user click on elsewhere, the Window will receive a click event.
However, this solution does not work across iframes.
Do you mean that the iframe will not hide the menu if you click in the top frame? Can you fix this if you handle the click event on the top of the frame tree?
Hmm, how could we do that?
The security issue related to this should be moderate, but when OOPIFs are enabled, it might be harder to listen to events from the top-level frame in a different process.
AFAIK they are enabling OOPIFs on M55 by default already.
Comment 1 by zqzh...@chromium.org
, Sep 29 2016