Skip to content

Commit

Permalink
Merge pull request #189901 from weartist/fix_188754
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge authored Aug 9, 2023
2 parents 199ad31 + 1c9d5ca commit 7a932b9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ import { defaultButtonStyles } from 'vs/platform/theme/browser/defaultStyles';
import { IWorkbenchAssignmentService } from 'vs/workbench/services/assignment/common/assignmentService';
import { IProductService } from 'vs/platform/product/common/productService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';


export const enum SettingsFocusContext {
Search,
Expand Down Expand Up @@ -334,6 +336,20 @@ export class SettingsEditor2 extends EditorPane {
this.createBody(this.rootElement);
this.addCtrlAInterceptor(this.rootElement);
this.updateStyles();

this._register(registerNavigableContainer({
focusNotifiers: [this],
focusNextWidget: () => {
if (this.searchWidget.inputWidget.hasWidgetFocus()) {
this.focusTOC();
}
},
focusPreviousWidget: () => {
if (!this.searchWidget.inputWidget.hasWidgetFocus()) {
this.focusSearch();
}
}
}));
}

override async setInput(input: SettingsEditor2Input, options: ISettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void> {
Expand Down

0 comments on commit 7a932b9

Please sign in to comment.