Closed Bug 1766093 Opened 4 months ago Closed 3 months ago

Everything on youtube home page is highlighted blue/selected

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 99
defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- verified

People

(Reporter: matttewell, Assigned: emilio)

References

Details

(Keywords: parity-chrome, regressionwindow-wanted, reproducible)

Attachments

(5 files)

Attached image fof264jkrdt81.webp

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0

Steps to reproduce:

When visting the home page 40% of the time after viewing a video, everything on youtube will be highlighted blue like it is selecting all on accident.

The Bugbug bot thinks this bug should belong to the 'Firefox::New Tab Page' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → New Tab Page

I didn't manage to reproduce your issue on the latest versions Nightly 101.0a1 and Firefox 99.0.1 on Windows 10 x64.
Could you please retest this using Firefox in Troubleshoot Mode and with a new profile?

http://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

Flags: needinfo?(matttewell)
Flags: needinfo?(matttewell)

Check out the attachments. I think the reason I only noticed this with youtube when I click the video to pause, the slightest mouse movement causes the home page button on the top left corner to become highlighted/selected. Once its highlighted then everything on the subsequent screen becomes highlighted too. I think the solution is to prevent anything on the page from becoming highlighted/selected when clicking or dragging the mouse within the video frame. Only text needs the ability to highlight for copying and pasting. Videos don't. I made a reddit post a while back and it appears other people have this issue too. Let me find it.

The severity field is not set for this bug.
:daleharvey, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dharvey)

matttewell, could you please let me know if your issue is reproducible in Troubleshoot Mode and with a new profile? Thanks

Flags: needinfo?(matttewell)

(In reply to Ina Popescu from comment #7)

matttewell, could you please let me know if your issue is reproducible in Troubleshoot Mode and with a new profile? Thanks

I already told you what the problem is and how to fix it. And no, that didn't work because its unrelated.

Flags: needinfo?(matttewell)

Sorry didnt mean to sound like a jerk

https://youtu.be/Nfe_rYoGBpw

I made a simpler video to depict the problem. Happens every time you click the video to pause (and move the mouse curser slightly) and then click the home page. Same thing happens on different profiles, troubleshooting mode, different machines, etc. I'm surprised I'm the only one noticing this. Please fix. Im begging you its SOOOOOOOO annoying!

(In reply to matttewell from comment #5)

Check out the attachments. I think the reason I only noticed this with youtube when I click the video to pause, the slightest mouse movement causes the home page button on the top left corner to become highlighted/selected. Once its highlighted then everything on the subsequent screen becomes highlighted too. I think the solution is to prevent anything on the page from becoming highlighted/selected when clicking or dragging the mouse within the video frame. Only text needs the ability to highlight for copying and pasting. Videos don't. I made a reddit post a while back and it appears other people have this issue too. Let me find it.

I can reproduce this in Nightly102.0a1Windows10, but not in Chrome.

This is not a recent regression because It can be reproduced in Firefox 68.0.

Has STR: --- → yes
Component: New Tab Page → DOM: UI Events & Focus Handling
Product: Firefox → Core

The following css workaround seems to work.

video {
  user-select: none;
}
QA Whiteboard: [qa-regression-triage]

In Gecko fullscreen doesn't make non-fullscreen stuff inert, but maybe it should. Seems to do in other browsers, see incoming test-case.

This is a bit unrelated to comment 13 after all, apparently.

Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1771150

It seems we don't allow it generally...

I couldn't reproduce the bad effect on standalone pages (so there's
something about the YouTube markup or how they setup the event listeners
or some other interaction going on), but:

  • This fixes the issue and is extremely simple.
  • It doesn't prevent users from selecting around videos and pasting
    them into rich text editors.
  • We already apply user-select: none to top-level video documents.

So over-all it should be pretty safe.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/987b65303e3c
Prevent text selection inside the video controls. r=Gijs
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/b50043dd828e
Fix a test that was relying on a selectionchange event which no longer happens.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Flags: qe-verify+

(In reply to Norisz Fay [:noriszfay] from comment #19)

https://hg.mozilla.org/mozilla-central/rev/987b65303e3c
https://hg.mozilla.org/mozilla-central/rev/b50043dd828e

I don't believe this issue was actually resolved. I haven't tried the "fix" yet, because it seems like a lot of work to which I don't have the time to actually do, but that just seems like putting a bandaid on the problem here. The real problem is why does firefox allow video frames to be selected as if they were rich text? If you disable that then we wouldn't be having this discussion.

(In reply to matttewell from comment #20)

I don't believe this issue was actually resolved. I haven't tried the "fix" yet, because it seems like a lot of work to which I don't have the time to actually do

It's a matter of downloading https://nightly.mozilla.org and reproducing the issue, should take about five minutes fwiw.

But that just seems like putting a bandaid on the problem here. The real problem is why does firefox allow video frames to be selected as if they were rich text? If you disable that then we wouldn't be having this discussion.

Well, the video controls are just regular HTML content inside the video element (using a ShadowRoot like any other web element would use). So by default they are selectable. The fix makes them not selectable, so I'm confused, what other kind of fix did you expect?

I was expecting to load up firefox with the latest update, and not have the entire home page for youtube to be blue. You didn't solve that problem, telling the user to run a beta version of the application is not a permanent fix, just a bandaid. So for now I would appreciate it if you changed this bug status back to open as the problem is not resolved.

Duplicate of this bug: 1772722

I have managed to reproduce the issue on Firefox 101 and I've verified the fix on Firefox 102.0b4.

Do you have an update when the latest version of firefox will contain this fix? Its 6/26 and the problem is still appearing. I don't want to use nightly because I am not a beta tester by trade, but rather an end user who should not have to go through all of that to solve this.

This is fixed in 102 which releases the 28th.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #26)

This is fixed in 102 which releases the 28th.

Just checked today and the bug is still not fixed on the latest version 102. I just checked that was my current version.

Looks like its fixed now. Odd because I have the same version as I did when I made the previous comment.

Flags: needinfo?(dharvey)
You need to log in before you can comment on or make changes to this bug.