youtube broken shortcuts with French keyboard layout
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: olivier.cailloux, Unassigned)
Details
Users on the web report that in youtube, Shift+, should decrease playback speed and Shift+. should increase it. Indeed, on Chrome, with OS configured with French layout (corresponding to my keycaps), holding Shift and the keycap with , decreases playback speed and holding Shift and hitting the keycap with . increases playback speed.
In FF however, only holding Shift and the keycap with , decreases playback speed as expected. I cannot increase playback speed, neither by holding Shift and hitting the keycap with . or not holding Shift and hitting the keycap with . or trying other keys. Switch my OS configuration to English US (even without restarting FF) makes it possible to increase and decrease playback speed with keyboard. But switch back to French (restarting FF or not) and the symptoms comes back.
| Reporter | ||
Comment 1•1 year ago
|
||
Cloned from https://bugzilla.mozilla.org/show_bug.cgi?id=1808931, as requested there.
Comment 2•1 year ago
|
||
Seems like Dom events would be a better component to get this triaged I think.
Comment 3•1 year ago
•
|
||
On macOS, the keyboard shortcuts work for me using the US keyboard layout and using the same keys on the Finnish keyboard layout. On the French keyboard layout, neither the same keys nor the documented characters (less than and greater than on different keys) work. In Chrome and Safari, pressing shift and the key to the left of the key for digit one increases the playback speed, but pressing the key without shift does not decrease it.
It seems to me that YouTube is rather broken regardless of browser with AZERTY. Not sure if the YouTube UI language matters (I get English in Firefox and Finnish in Chrome and Safari, i.e. QWERTY languages).
I suspect a site bug.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Confirming in the sense that this happens. (Not in the sense of saying this is a Gecko bug.)
Updated•1 year ago
|
I found this:
switch (a) {
<snip>
case 190:
b ? !n.enableSpeedOptions ||
this.api.L('html5_lifa_ui_disablement') &&
!s1a(this) ||
(
m = this.api.getPlaybackRate(),
this.api.setPlaybackRate(m + 0.25, !0),
n0a(this.je, !1),
m = !0
) : this.api.Nh() &&
(this.step(1), m = !0);
break;
case 188:
b ? !n.enableSpeedOptions ||
this.api.L('html5_lifa_ui_disablement') &&
!s1a(this) ||
(
m = this.api.getPlaybackRate(),
this.api.setPlaybackRate(m - 0.25, !0),
n0a(this.je, !0),
m = !0
) : this.api.Nh() &&
(this.step( - 1), m = !0);
break;
So, they refer the legacy keyCode value. And Gecko considers the keyCode value with the character introduced without any modifier state. Therefore, the Comma key, which introduces ; and . in French keyboard layout, causes .keyCode 59 from ;.
We could set 190 instead if shifted character is .. However, it's risky since some web apps using .keyCode considers the value with UA check. So, I think that YouTube should stop using .keyCode, but there is no standardized API to check different modifier state character. So, it's currently impossible to check a key with some active modifier with unshifted character.
Updated•1 year ago
|
Comment 6•1 year ago
|
||
I pinged YouTube about this.
Description
•