vjs-record-indicator div overlays the screen in Chromium-based browsers and takes over the clicks. It means that when the videojs-record is used then user experience is heavily degraded as users sometimes need to click several times on an element to trigger its action.
Add <button type="button" onclick="javascript:console.log('clicked')">Test button</button> to the page
a) Open devtools
b) When on the "Elements" tab select the body tag, right click it and select "Edit as HTML"
c) Paste <button type="button" onclick="javascript:console.log('clicked')">Test button</button> just after the <body> tag.
Start clicking on the button and observe the console (either switch to Console in the devtools or open Console Drawer there). You should see increasing number of the "clicked" being logged there.
Results
Not every click on the button is registered so our "clicked" text is not displayed (counted) for every click.
Expected
Every click on the button is registered so "clicked" text is displayed (counted) for every click.
Actual
What happens here is that <div class="vjs-record-indicator vjs-control vjs-hidden" dir="ltr" data-label="REC"></div> element somehow intercepts click events.
You can add simple listener to find out that it's this element:
then just start clicking on the page and observe output in the console.
The fix seems to be as simple as removing display: block!important; from the vjs-hidden class in the record-indicator.scss. I'm not sure about possible side effects of such removal though.
Description
vjs-record-indicator
div overlays the screen in Chromium-based browsers and takes over the clicks. It means that when the videojs-record is used then user experience is heavily degraded as users sometimes need to click several times on an element to trigger its action.Steps to reproduce
<button type="button" onclick="javascript:console.log('clicked')">Test button</button>
to the page a) Open devtools b) When on the "Elements" tab select the body tag, right click it and select "Edit as HTML" c) Paste<button type="button" onclick="javascript:console.log('clicked')">Test button</button>
just after the<body>
tag.Results
Not every click on the button is registered so our "clicked" text is not displayed (counted) for every click.
Expected
Every click on the button is registered so "clicked" text is displayed (counted) for every click.
Actual
What happens here is that
<div class="vjs-record-indicator vjs-control vjs-hidden" dir="ltr" data-label="REC"></div>
element somehow intercepts click events.You can add simple listener to find out that it's this element:
then just start clicking on the page and observe output in the console.
The fix seems to be as simple as removing
display: block!important;
from thevjs-hidden
class in therecord-indicator.scss
. I'm not sure about possible side effects of such removal though.Additional Information
Please include any additional information necessary here. Including the following:
versions
browsers
what browser(s) are affected? Make sure to test with all third-party browser extensions disabled.
OSes
what platforms (operating systems and devices) are affected?