Skip to content

[stable5.4] fix(edit): keep focus on the used move button when reordering options - #3946

Merged
AndyScherzinger merged 1 commit into
stable5.4from
backport/3937/stable5.4
Nov 20, 2026
Merged

AndyScherzinger merged 1 commit into
stable5.4from
backport/3937/stable5.4

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 20, 2026

Copy link
Copy Markdown

Backport of PR #3937

@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews AI assisted labels Nov 20, 2026
After an option is moved, the move-up/move-down buttons change their
disabled state, NcActions re-renders and then moves focus to its first
action unless one of its items is marked active. The previous code also
focused the action's <li> wrapper instead of its button. Focus the
button and mark its item active, so focus stays on the button that was
used (or the other one once the option reaches the top or bottom).

The move menu is rendered inside the option's list item. While the
options animate into their new order, every moving item gets a
transform and so its own stacking context, and the items after the one
with the open menu were painted over the menu. Lift the list item
above its siblings while its menu is open.

The ranked list that respondents reorder in a ranking question had the
same two problems and gets the same fixes. It also looked the move
buttons up by position in refs that Vue keeps in mount order, so after
a reorder it could focus another item's button; look them up by option
id instead. The focus handling is shared in FocusActionItem.ts.

Fixes #2595

Co-authored-by: Himanshu Bhardwaj <bhardwajhimanshu2515@gmail.com>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Himanshu Bhardwaj <bhardwajhimanshu2515@gmail.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@backportbot
backportbot Bot force-pushed the backport/3937/stable5.4 branch from cf1a449 to ac7b84d Compare November 20, 2026 13:47
@AndyScherzinger
AndyScherzinger merged commit 2d1c0d2 into stable5.4 Nov 20, 2026
42 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/3937/stable5.4 branch November 20, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants