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';
42
42
import { Iterable } from 'vs/base/common/iterator' ;
43
43
import { CommentController } from 'vs/workbench/contrib/comments/browser/commentsController' ;
44
44
import { Range } from 'vs/editor/common/core/range' ;
45
+ import { registerNavigatableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands' ;
45
46
46
47
const CONTEXT_KEY_HAS_COMMENTS = new RawContextKey < boolean > ( 'commentsView.hasComments' , false ) ;
47
48
const CONTEXT_KEY_SOME_COMMENTS_EXPANDED = new RawContextKey < boolean > ( 'commentsView.someCommentsExpanded' , false ) ;
@@ -145,6 +146,23 @@ export class CommentsPanel extends FilterViewPane implements ICommentsView {
145
146
super . saveState ( ) ;
146
147
}
147
148
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
+
148
166
public focusFilter ( ) : void {
149
167
this . filterWidget . focus ( ) ;
150
168
}
You can’t perform that action at this time.
0 commit comments