File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import { ITreeElement } from 'vs/base/browser/ui/tree/tree';
4242import { Iterable } from 'vs/base/common/iterator' ;
4343import { CommentController } from 'vs/workbench/contrib/comments/browser/commentsController' ;
4444import { Range } from 'vs/editor/common/core/range' ;
45+ import { registerNavigatableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands' ;
4546
4647const CONTEXT_KEY_HAS_COMMENTS = new RawContextKey < boolean > ( 'commentsView.hasComments' , false ) ;
4748const CONTEXT_KEY_SOME_COMMENTS_EXPANDED = new RawContextKey < boolean > ( 'commentsView.someCommentsExpanded' , false ) ;
@@ -145,6 +146,23 @@ export class CommentsPanel extends FilterViewPane implements ICommentsView {
145146 super . saveState ( ) ;
146147 }
147148
149+ override render ( ) : void {
150+ super . render ( ) ;
151+ this . _register ( registerNavigatableContainer ( {
152+ focusNotifiers : [ this , this . filterWidget ] ,
153+ focusNextWidget : ( ) => {
154+ if ( this . filterWidget . hasFocus ( ) ) {
155+ this . focus ( ) ;
156+ }
157+ } ,
158+ focusPreviousWidget : ( ) => {
159+ if ( ! this . filterWidget . hasFocus ( ) ) {
160+ this . focusFilter ( ) ;
161+ }
162+ }
163+ } ) ) ;
164+ }
165+
148166 public focusFilter ( ) : void {
149167 this . filterWidget . focus ( ) ;
150168 }
You can’t perform that action at this time.
0 commit comments