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

Hitting space to check/uncheck checkboxes doesn't work on firefox
This commit is contained in:
dkanada 2020-08-14 18:23:16 +09:00 committed by GitHub
commit fea28f7277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import 'webcomponents';
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,6 +1,7 @@
import layoutManager from 'layoutManager';
import 'css!./emby-radio';
import 'webcomponents';
import browser from 'browser';
/* eslint-disable indent */
@ -9,7 +10,7 @@ import 'webcomponents';
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();
if (!this.checked) {