Repository navigation
[stable5.4] fix(edit): keep focus on the used move button when reordering options - #3946
Merged
Merged
Conversation
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
Bot
force-pushed
the
backport/3937/stable5.4
branch
from
November 20, 2026 13:47
cf1a449 to
ac7b84d
Compare
Chartman123
approved these changes
Nov 20, 2026
AndyScherzinger
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #3937