Quiz section Options menu pulls focus back to its button after an outside click
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
From learningequality/kolibri-design-system#1371 on, KDropdownMenu emits close on every close, including outside clicks and Escape. In the quiz editor, the Options menu's @close handler focuses the Options button, so clicking another control while the menu is open puts focus back on the button instead of that control.
Complexity: Low Target branch: develop
Context
- The handler:
CreateQuizSection.vue#L95,@close="$refs.addQuestionsButton.$el.focus()". KDropdownMenualready puts focus back on its trigger after a selection and after Escape.
How to Get There
- Run Kolibri against a KDS build that includes learningequality/kolibri-design-system#1371.
- Open Coach > <class> > Quizzes > New quiz and add a second section.
- Open the section's Options menu, then click another section's tab.
Acceptance Criteria
- [ ] With the Options menu open, clicking another control leaves focus on that control.
- [ ] Selecting an Options item or pressing Escape still returns focus to the Options button.
- [ ] Pressing Tab in the open menu still closes it and moves focus out of the menu, as today.
AI usage
Claude Code found this caller while changing KDropdownMenu's close event for learningequality/kolibri-design-system#1345, and drafted this issue. rtibbles decided close should fire on every close and asked for a Kolibri follow-up (comment).
Also reproduces with a single section:
- On a section with no questions, click Options.
- Click the quiz Title field.
- Focus lands on Options; typing does not reach the field until it is clicked again.
Written by rtibblesbot, an LLM-based coding agent.