+
{{ messageSkeletonPlayersSearch }}
diff --git a/src/components/list/ServerList.vue b/src/components/list/ServerList.vue
index d7ec69a..c166310 100644
--- a/src/components/list/ServerList.vue
+++ b/src/components/list/ServerList.vue
@@ -15,7 +15,7 @@
-->
-
+
diff --git a/src/components/list/WorldList.vue b/src/components/list/WorldList.vue
index b46227b..ee209d7 100644
--- a/src/components/list/WorldList.vue
+++ b/src/components/list/WorldList.vue
@@ -15,7 +15,7 @@
-->
-
+
diff --git a/src/components/util/RadioList.vue b/src/components/util/RadioList.vue
index b35c42e..bfef954 100644
--- a/src/components/util/RadioList.vue
+++ b/src/components/util/RadioList.vue
@@ -15,6 +15,8 @@
-->
@@ -26,13 +28,25 @@ import {handleKeyboardEvent} from "@/util/events";
export default defineComponent({
name: 'RadioList',
+ props: {
+ name: {
+ type: String,
+ required: true
+ }
+ },
+
setup() {
const onKeydown = (e: KeyboardEvent) => {
handleKeyboardEvent(e, Array.from((e.currentTarget as HTMLFieldSetElement).elements) as HTMLElement[])
- }
+ };
+
+ const moveFocus = (e: FocusEvent) => {
+ ((e.target as HTMLElement).nextElementSibling as HTMLElement).focus();
+ };
return {
- onKeydown
+ onKeydown,
+ moveFocus
}
},
});
diff --git a/src/util/events.ts b/src/util/events.ts
index 2a4962c..c9deda9 100644
--- a/src/util/events.ts
+++ b/src/util/events.ts
@@ -76,6 +76,11 @@ export const handleKeyboardEvent = (e: KeyboardEvent, elements: HTMLElement[]) =
newPosition = 0;
}
+ // Skip over firefox bugfix radio button in RadioList
+ if(typeof elements[newPosition].dataset.ignore !== 'undefined') {
+ newPosition = e.key == 'ArrowUp' || e.key == 'ArrowLeft' ? elements.length - 1 : newPosition + 1;
+ }
+
(elements[newPosition] as HTMLElement).focus();
e.preventDefault();
} else if(e.key === 'Enter' && e.target) {