@@ -14,7 +14,7 @@ import { INotificationViewItem } from 'vs/workbench/common/notifications';
14
14
import { NotificationsListDelegate , NotificationRenderer } from 'vs/workbench/browser/parts/notifications/notificationsViewer' ;
15
15
import { CopyNotificationMessageAction } from 'vs/workbench/browser/parts/notifications/notificationsActions' ;
16
16
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
17
- import { assertIsDefined , assertAllDefined } from 'vs/base/common/types' ;
17
+ import { assertAllDefined } from 'vs/base/common/types' ;
18
18
import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys' ;
19
19
import { Disposable } from 'vs/base/common/lifecycle' ;
20
20
import { AriaRole } from 'vs/base/browser/ui/aria/aria' ;
@@ -43,13 +43,8 @@ export class NotificationsList extends Disposable {
43
43
super ( ) ;
44
44
}
45
45
46
- show ( focus ?: boolean ) : void {
46
+ show ( ) : void {
47
47
if ( this . isVisible ) {
48
- if ( focus ) {
49
- const list = assertIsDefined ( this . list ) ;
50
- list . domFocus ( ) ;
51
- }
52
-
53
48
return ; // already visible
54
49
}
55
50
@@ -60,12 +55,6 @@ export class NotificationsList extends Disposable {
60
55
61
56
// Make visible
62
57
this . isVisible = true ;
63
-
64
- // Focus
65
- if ( focus ) {
66
- const list = assertIsDefined ( this . list ) ;
67
- list . domFocus ( ) ;
68
- }
69
58
}
70
59
71
60
private createNotificationsList ( ) : void {
@@ -221,17 +210,17 @@ export class NotificationsList extends Disposable {
221
210
}
222
211
223
212
focusFirst ( ) : void {
224
- if ( ! this . isVisible || ! this . list ) {
225
- return ; // hidden
213
+ if ( ! this . list ) {
214
+ return ; // not created yet
226
215
}
227
216
228
217
this . list . focusFirst ( ) ;
229
218
this . list . domFocus ( ) ;
230
219
}
231
220
232
221
hasFocus ( ) : boolean {
233
- if ( ! this . isVisible || ! this . listContainer ) {
234
- return false ; // hidden
222
+ if ( ! this . listContainer ) {
223
+ return false ; // not created yet
235
224
}
236
225
237
226
return isAncestor ( document . activeElement , this . listContainer ) ;
0 commit comments