1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #1799 from matjaz321/checkbox-space-ff-issue

Hitting space to check/uncheck checkboxes doesn't work on firefox

(cherry picked from commit fea28f7277)
This commit is contained in:
dkanada 2020-08-14 18:23:16 +09:00 committed by Joshua M. Boniface
parent 15e9b645f2
commit cac6b42dab
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'webcomponents'], function (bro
function onKeyDown(e) {
// Don't submit form on enter
// Real (non-emulator) Tizen does nothing on Space
if (e.keyCode === 13 || e.keyCode === 32) {
if (e.keyCode === 13 || (e.keyCode === 32 && browser.tizen)) {
e.preventDefault();
this.checked = !this.checked;

View file

@ -1,4 +1,4 @@
define(['layoutManager', 'css!./emby-radio', 'webcomponents'], function (layoutManager) {
define(['browser', 'layoutManager', 'css!./emby-radio', 'webcomponents'], function (browser, layoutManager) {
'use strict';
var EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
@ -7,7 +7,7 @@ define(['layoutManager', 'css!./emby-radio', 'webcomponents'], function (layoutM
// Don't submit form on enter
// Real (non-emulator) Tizen does nothing on Space
if (e.keyCode === 13 || e.keyCode === 32) {
if (e.keyCode === 13 || (e.keyCode === 32 && browser.tizen)) {
e.preventDefault();
if (!this.checked) {