Open Bug 1862439 Opened 1 years ago Updated 3 months ago

YouTube video loses partial focus after ALT-TAB

Categories

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

Firefox 119
defect

Tracking

()

REOPENED

People

(Reporter: radical8bit, Unassigned)

References

Details

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

Steps to reproduce:

  1. Open any application e.g., notepad.exe. (We need that later.)
  2. Open Firefox.
  3. Visit youtube.com in Firefox and play a random video.
  4. Confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards and that SPACE pauses and plays the video.
  5. ALT-TAB to the other application. (notepad.exe if you followed Step 1)
  6. ALT-TAB back to Firefox.
  7. Re-confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards.
  8. SPACE will not pause/play the video.
  9. Click on the video.
  10. SPACE will now pause/play the video again.

Actual results:

  1. SPACE will not pause/play the video.

While the arrow keys (and possibly other keyboard commands) continue to work on the video, SPACE has lost its functionality after revisiting Firefox with ALT-TAB.

Expected results:

The SPACE key should continue to pause/play the video, in the same way the arrow keys work.

BTW, the SPACE key works as intended, if instead of ALT-TAB the taskbar is used to change the application.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Will try to verify later.

Flags: needinfo?(htsai)

I can reproduce this. We also have other bug reports for the same problem.

Status: UNCONFIRMED → RESOLVED
Closed: 1 years ago
Duplicate of bug: 1863821
Flags: needinfo?(htsai)
Resolution: --- → DUPLICATE

Reopen this, and close bug 1863821 as duplicate instead, given this bug has a clear STR but Bug 1863821 doesn't.

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1863821
Ever confirmed: true
Resolution: DUPLICATE → ---
Duplicate of this bug: 1863821

Hi Alastor, do you know what's up here? Thank you.

Flags: needinfo?(alwu)

S3/P2 - it's annoying the space key doesn't work consistently as expected; the workaround to pause and resume the video exists by a mouse clicking.

Severity: -- → S3
Priority: -- → P2

I can't reproduce this issue on my Windows 11. We need to identify where the problem is. Is Yotube doesn't monitor space key at that moment? or we lost the window focus again? or any addon interfering the website? or Youtube calls video pause but it didn't work?

It would be great to capture a profiled result by using timestamp,HTMLMediaElement:5,HTMLMediaElementEvents:5,MediaControl:5, here are the instructions [1].

[1]
https://alastor0325.github.io/htmltests/about_logging.mp4
https://www.youtube.com/watch?v=xRD4wQboEfI (old version, but it has the text description for each steps)

Flags: needinfo?(alwu) → needinfo?(radical8bit)

I can reproduce it on two different computers. Your colleague [:hsinyi] is also able to reproduce this. Maybe you can try again to reproduce the problem, or ideally discuss this directly with your her. I would assume that whatever information you need is easier to collect with your colleague.

https://share.firefox.dev/3vtsCdj

Flags: needinfo?(radical8bit)
Flags: needinfo?(htsai)
Flags: needinfo?(alwu)

I can still reproduce this 100%, on Win11 and Nightly 123. Here is the logging https://share.firefox.dev/3Sjy4c0

Alastor, feel free to reach out if there's anything I can support.

Flags: needinfo?(htsai)

Issue still there in version 123.0. Is there a timeline to fix this bug?

This doesn't seem related with media directly. I will recommend someone in DOM team to investigate why space key isn't propagated to the video element.

Flags: needinfo?(alwu)

This is partly resolved in version 132. Following the steps outlined in my first post ...

Steps to reproduce:

  1. Open any application e.g., notepad.exe. (We need that later.)
  2. Open Firefox.
  3. Visit youtube.com in Firefox and play a random video.
  4. Confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards and that SPACE pauses and plays the video.
  5. ALT-TAB to the other application. (notepad.exe if you followed Step 1)
  6. ALT-TAB back to Firefox.
  7. Re-confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards.
  8. SPACE will not pause/play the video.
  9. Click on the video.
  10. SPACE will now pause/play the video again.

... step 8 will now pause/play the video. However, pressing the SPACE bar and keeping it pressed does not speed up the video. After clicking on the video and then pressing space bar (while the video is playing) it speeds up the video playback normally again. Can someone reproduce this?

Flags: needinfo?(continuation)

The spacebar behavior seems to behave the way you said it should. I'm on MacOS, on version 135 if that matters.

Flags: needinfo?(continuation)

Well, yes it matters. This bug is opened for Windows, not macOS.

Flags: needinfo?(htsai)

(In reply to Daniel from comment #13)

This is partly resolved in version 132. Following the steps outlined in my first post ...

Steps to reproduce:

  1. Open any application e.g., notepad.exe. (We need that later.)
  2. Open Firefox.
  3. Visit youtube.com in Firefox and play a random video.
  4. Confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards and that SPACE pauses and plays the video.
  5. ALT-TAB to the other application. (notepad.exe if you followed Step 1)
  6. ALT-TAB back to Firefox.
  7. Re-confirm that ARROWLEFT and ARROWRIGHT move the video backwards and forwards.
  8. SPACE will not pause/play the video.
  9. Click on the video.
  10. SPACE will now pause/play the video again.

... step 8 will now pause/play the video. However, pressing the SPACE bar and keeping it pressed does not speed up the video. After clicking on the video and then pressing space bar (while the video is playing) it speeds up the video playback normally again. Can someone reproduce this?

Not always, but "speeds up" doesn't work intermittently for me, when I tried with Nightly 136 on Win 11 .

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