Request for fullscreen denied incorrectly on YouTube with accessibility.typeaheadfind
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: Smylers, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
- In
about:config
, ensureaccessibility.typeaheadfind
is false. - In a non-full-screen non-maximized window, go to a YouTube video.
- Click on a non-interactive bit of text on the page (such as the video description), to ensure the video isn't focussed.
- Note that you can press
F
to toggle the video into and out-out of being full-screen. - Toggle
accessibility.typeaheadfind
true. - Go back to the YouTube video, click on the static text again, and press
F
again.
Actual results:
The window maximizes, the video scales up within the larger window size (though without actually becoming full-screen) and then immediately the window and the video restore their original size, putting you back as you were before pressing F
.
Pressing Ctrl+Shift+K
to display the dev tools console shows the warning “Request for fullscreen was denied because requesting element is not in the currently focused tab.”
Expected results:
The video should have switched to being full-screen and stayed like that, as it does when type-ahead find is off. No warning should be generated about the currently focused tab, because the video that tried to be full-screen is in the currently focused tab.
Note the problem (sometime?) doesn't occur if the video itself was the most recently clicked on element before pressing F
. For instance, if on a playing video you click it twice (the first time pauses it, so click it a second time to unpause) and then immediately press F
, the video does successfully switch to being full-screen. Pressing F
a second time exits being full-screen, but pressing it a third time doesn't go back to being full-screen; you need to click again first.
The problem does still occur even if the browser window itself is first made full-screen, for instance with F11
, before pressing F
, but it's harder to see, because nothing appears to happen (other than the warning in the console); on an unmaximized window you get to see the window growing and immediately shrinking again.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Do you know how toggling "accessibility.typeaheadfind" impact the determination of a focused tab?
Comment 3•3 years ago
|
||
When the "accessibility.typeaheadfind" is toggled to true, typing on the content will trigger find operation, i.e. open the findbar and move focus there. And fullscreen reject because the focus isn't on the web content anymore.
(In reply to Smylers from comment #0)
Note the problem (sometime?) doesn't occur if the video itself was the most recently clicked on element before pressing
F
. For instance, if on a playing video you click it twice (the first time pauses it, so click it a second time to unpause) and then immediately pressF
, the video does successfully switch to being full-screen.
I think it is because this case, when focus is on video, doesn't trigger a find operation, so video can switch to fullscreen successfully.
Comment 4•3 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #3)
When the "accessibility.typeaheadfind" is toggled to true, typing on the content will trigger find operation, i.e. open the findbar and move focus there. And fullscreen reject because the focus isn't on the web content anymore.
Does that mean this is the side effect that is inevitable (or nearly hard to prevent) in accessibility.typeaheadfind feature?
(In reply to Smylers from comment #0)
Note the problem (sometime?) doesn't occur if the video itself was the most recently clicked on element before pressing
F
. For instance, if on a playing video you click it twice (the first time pauses it, so click it a second time to unpause) and then immediately pressF
, the video does successfully switch to being full-screen.I think it is because this case, when focus is on video, doesn't trigger a find operation, so video can switch to fullscreen successfully.
Comment 5•3 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #4)
Does that mean this is the side effect that is inevitable (or nearly hard to prevent) in accessibility.typeaheadfind feature?
Yes, I don't think it is easy to prevent that from fullscreen point of view.
I also noticed that we behave differently before 68 where pressing f
only triggers the find operation, page doesn't tries to goes into fullscreen (maybe the event isn't dispatched to the content if we perform find operation?). I got following range, https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dfc513e7e1413158d8d0d6ccf029c4a0b6a0a2ca&tochange=21d22b2f541258d3d1cf96c7ba5ad73e96e616b5 but have no idea which changeset might related to it. Also not sure which behave is we expect.
Description
•