Repository navigation
Fix keyboard navigation in toolbar-paned preference windows - #568
Merged
hannesa2 merged 1 commit intoAug 11, 2026
Merged
Conversation
Enable Tab/Shift-Tab field navigation, shared by PBPrefsWindowController (App Settings) and PBGitPrefsWindowController (Git Preferences), both built on DBPrefsWindowController. The panes are separate top-level views swapped in as subviews at runtime, so Interface Builder's key view loop never ran over them and the window never computed one of its own. - Turn on autorecalculatesKeyViewLoop so AppKit derives the Tab order from view geometry, recalculated each time a pane is swapped in - Reset the first responder at the end of -showWindow:, mirroring the existing work-around in -animationDidEnd:, so a valid key view loop no longer leaves a control focused when the window is shown
goneng
force-pushed
the
fix-prefs-window-keyboard-navigation
branch
from
August 11, 2026 12:39
e1cb604 to
2742baf
Compare
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.
Summary
Restore keyboard navigation in GitX's toolbar-paned preference windows:
DBPrefsWindowControllerbuilds itsNSPanelin code and never setautorecalculatesKeyViewLoop, so no key view chain ever existed and Tab/Shift-Tabdid nothing. Because the panes are separate top-level views added as subviews at
runtime, Interface Builder's own key-view-loop computation never ran over them
either. This affects every window built on it, including the existing App Settings
window (
PBPrefsWindowController).autorecalculatesKeyViewLoopin-windowDidLoadso AppKit derivesTab/Shift-Tab order from view geometry, recalculated each time a pane is swapped in
-showWindow:, mirroring the existingwork-around in
-animationDidEnd:, so a valid key view loop no longer causes thefirst control to grab focus when the window is shown
Test plan
backward through the controls of the current pane in visual order.
second open after closing it with a control focused.