Rich text editor: toolbar More menu closes on first click after the window narrows

Open
#6,462 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with ToolbarMoreButton.vue and the constrainToScrollParent=false case, then look at the KDS 5.10.1 popover boundary/close-on-scroll handling introduced by #6457, since the issue suggests the fix may live there rather than in Studio. Read #6457 first, then reproduce per the steps (900px, click More, Escape, narrow to 520px, click More) and confirm on the pre-#6457 base whether the regression is in Studio or KDS. Done means the More menu stays open on the first click at narrowed widths in both the question and answer-choice toolbars.

Written by the indexing model from the issue text.

Description

bug DEV: frontend TAG: design system

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: unstable

Observed behavior

After the window narrows, the first click on the editor toolbar's More button opens its menu, which closes again ~25ms later. The second click works.

  • Reproduced 3/3; also at 1100→700px and 820→520px.
  • Affects both the question and the answer-choice toolbars.
  • Only menus with constrainToScrollParent=false are affected (ToolbarMoreButton.vue).

Errors and logs

None.

Expected behavior

The first click opens the More menu and it stays open.

User-facing consequences

Editors on narrowed windows must click More twice.

Steps to reproduce

  1. Open a resource's Edit details → Questions; open the Q1 editor with the window at 900px.
  2. Click More, then press Escape.
  3. Narrow the window to 520px.
  4. Click More. The menu opens and immediately closes.

Context

  • Seen while reviewing #6457 (KDS bump to 5.10.1).
  • Cause: the menu first renders at its old wide-layout position; focusing its first item scrolls the window ~436px, and the popover's close-on-scroll shuts it.
  • Not yet checked on the pre-#6457 base. KDS 5.10.1 rewrote the popover's boundary handling, so the fix may belong in KDS.

AI usage

Claude Code found and reproduced this in the browser while reviewing #6457 and drafted this issue.

Dominant language
JavaScript
Stars
214
Forks
327
Avg merge
17h 5m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learningequality/studio

All issues in learningequality/studio

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.