diff --git a/src/components/Questions/Question.vue b/src/components/Questions/Question.vue index 353fad731..7a1e1309e 100644 --- a/src/components/Questions/Question.vue +++ b/src/components/Questions/Question.vue @@ -378,19 +378,22 @@ export default defineComponent({ } /** - * Reorder question but keep focus on the button + * Reorder question but keep focus on the button, or on the other move button once the question is the last one */ const onMoveDown = (): void => { emit('moveDown') nextTick(() => { - buttonDown.value?.$el?.focus() + ;(props.canMoveDown ? buttonDown : buttonUp).value?.$el?.focus() }) } + /** + * Reorder question but keep focus on the button, or on the other move button once the question is the first one + */ const onMoveUp = (): void => { emit('moveUp') nextTick(() => { - buttonUp.value?.$el?.focus() + ;(props.canMoveUp ? buttonUp : buttonDown).value?.$el?.focus() }) } diff --git a/src/components/Questions/QuestionColor.vue b/src/components/Questions/QuestionColor.vue index 5241f41a7..5b96a86c9 100644 --- a/src/components/Questions/QuestionColor.vue +++ b/src/components/Questions/QuestionColor.vue @@ -5,6 +5,7 @@