FIX: Action Maps list loses keyboard focus after deleting a map [UUM-147152]#2458
Open
Pauliusd01 wants to merge 4 commits into
Open
FIX: Action Maps list loses keyboard focus after deleting a map [UUM-147152]#2458Pauliusd01 wants to merge 4 commits into
Pauliusd01 wants to merge 4 commits into
Conversation
…147152] The Action Maps list in the UITK Input Actions editor lost keyboard focus after a map was deleted, so shortcuts stopped working until the user clicked a map again. ActionMapsView.DeleteActionMap(int index) dispatches the delete command that rebuilds the list and destroys the previously focused row, leaving the panel with no focused element. It now calls m_ListView.Focus() after the dispatch, restoring focus to the Action Maps list so Delete, Duplicate, and arrow-key navigation keep flowing to the auto-selected replacement map. This mirrors the existing behaviour in the sibling ActionsTreeView.DeleteItem. Jira: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-147152
Contributor
|
ℹ️ Skipped — a harness review for this commit ( 🤖 Helpful? 👍/👎 |
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2458 +/- ##
========================================
Coverage 78.95% 78.96%
========================================
Files 767 767
Lines 140780 140792 +12
========================================
+ Hits 111153 111171 +18
+ Misses 29627 29621 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Pauliusd01
requested review from
VeraMommersteeg
and removed request for
jfreire-unity
July 23, 2026 11:58
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.
Description
Note
This pull request was generated automatically. Please review carefully before merging.
ActionMapsView.DeleteActionMap(int index)in the UI Toolkit Input Actions editor dispatched the delete command and returned without restoring keyboard focus. The delete triggers a list rebuild that destroys the previously focused row, so the Action Maps list was left with no focused element even though a replacement map was auto-selected and highlighted. As a result Delete, Duplicate, and arrow-key navigation were silently ignored on the highlighted map until the user clicked a row to re-focus the list.The fix adds
m_ListView.Focus()immediately after the dispatch, returning focus to the Action Maps list once the rebuild has run so command and navigation events keep reaching it. This reuses the same convention already applied in the siblingActionsTreeView.DeleteItem, which the Action Maps list had never received.Testing status & QA
Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs→[UnityTest] ActionMapsList_WhenMapDeletedViaKeyboard_ListRetainsFocus, which deletes a selected map via the Delete command and asserts the list view holds focus afterward.Overall Product Risks
Comments to reviewers
N/A
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.