@@ -189,7 +189,6 @@ class MultipleSelectionController<T> extends Disposable implements IMultipleSele
189
189
190
190
function toWorkbenchListOptions < T > (
191
191
accessor : ServicesAccessor ,
192
- container : HTMLElement ,
193
192
options : IListOptions < T > ,
194
193
) : [ IListOptions < T > , IDisposable ] {
195
194
const configurationService = accessor . get ( IConfigurationService ) ;
@@ -203,7 +202,7 @@ function toWorkbenchListOptions<T>(
203
202
mouseWheelScrollSensitivity : configurationService . getValue < number > ( mouseWheelScrollSensitivityKey ) ,
204
203
fastScrollSensitivity : configurationService . getValue < number > ( fastScrollSensitivityKey ) ,
205
204
multipleSelectionController : options . multipleSelectionController ?? disposables . add ( new MultipleSelectionController ( configurationService ) ) ,
206
- keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( container , keybindingService ) ,
205
+ keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( keybindingService ) ,
207
206
} ;
208
207
209
208
return [ result , disposables ] ;
@@ -244,7 +243,7 @@ export class WorkbenchList<T> extends List<T> {
244
243
@IInstantiationService instantiationService : IInstantiationService
245
244
) {
246
245
const horizontalScrolling = typeof options . horizontalScrolling !== 'undefined' ? options . horizontalScrolling : Boolean ( configurationService . getValue ( horizontalScrollingKey ) ) ;
247
- const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , container , options ) ;
246
+ const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , options ) ;
248
247
249
248
super ( user , container , delegate , renderers ,
250
249
{
@@ -384,7 +383,7 @@ export class WorkbenchPagedList<T> extends PagedList<T> {
384
383
@IInstantiationService instantiationService : IInstantiationService
385
384
) {
386
385
const horizontalScrolling = typeof options . horizontalScrolling !== 'undefined' ? options . horizontalScrolling : Boolean ( configurationService . getValue ( horizontalScrollingKey ) ) ;
387
- const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , container , options ) ;
386
+ const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , options ) ;
388
387
super ( user , container , delegate , renderers ,
389
388
{
390
389
keyboardSupport : false ,
@@ -517,7 +516,7 @@ export class WorkbenchTable<TRow> extends Table<TRow> {
517
516
@IInstantiationService instantiationService : IInstantiationService
518
517
) {
519
518
const horizontalScrolling = typeof options . horizontalScrolling !== 'undefined' ? options . horizontalScrolling : Boolean ( configurationService . getValue ( horizontalScrollingKey ) ) ;
520
- const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , container , options ) ;
519
+ const [ workbenchListOptions , workbenchListOptionsDisposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , options ) ;
521
520
522
521
super ( user , container , delegate , columns , renderers ,
523
522
{
@@ -812,7 +811,7 @@ class TreeResourceNavigator<T, TFilterData> extends ResourceNavigator<T> {
812
811
}
813
812
}
814
813
815
- function createKeyboardNavigationEventFilter ( container : HTMLElement , keybindingService : IKeybindingService ) : IKeyboardNavigationEventFilter {
814
+ function createKeyboardNavigationEventFilter ( keybindingService : IKeybindingService ) : IKeyboardNavigationEventFilter {
816
815
let inChord = false ;
817
816
818
817
return event => {
@@ -825,7 +824,7 @@ function createKeyboardNavigationEventFilter(container: HTMLElement, keybindingS
825
824
return false ;
826
825
}
827
826
828
- const result = keybindingService . softDispatch ( event , container ) ;
827
+ const result = keybindingService . softDispatch ( event , event . target ) ;
829
828
830
829
if ( result ?. enterChord ) {
831
830
inChord = true ;
@@ -862,7 +861,7 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
862
861
@IThemeService themeService : IThemeService ,
863
862
@IConfigurationService configurationService : IConfigurationService
864
863
) {
865
- const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , container , options as any ) ;
864
+ const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , options as any ) ;
866
865
super ( user , container , delegate , renderers , treeOptions ) ;
867
866
this . disposables . add ( disposable ) ;
868
867
this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -903,7 +902,7 @@ export class WorkbenchCompressibleObjectTree<T extends NonNullable<any>, TFilter
903
902
@IThemeService themeService : IThemeService ,
904
903
@IConfigurationService configurationService : IConfigurationService
905
904
) {
906
- const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , container , options as any ) ;
905
+ const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , options as any ) ;
907
906
super ( user , container , delegate , renderers , treeOptions ) ;
908
907
this . disposables . add ( disposable ) ;
909
908
this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -950,7 +949,7 @@ export class WorkbenchDataTree<TInput, T, TFilterData = void> extends DataTree<T
950
949
@IThemeService themeService : IThemeService ,
951
950
@IConfigurationService configurationService : IConfigurationService
952
951
) {
953
- const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , container , options as any ) ;
952
+ const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , options as any ) ;
954
953
super ( user , container , delegate , renderers , dataSource , treeOptions ) ;
955
954
this . disposables . add ( disposable ) ;
956
955
this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -997,7 +996,7 @@ export class WorkbenchAsyncDataTree<TInput, T, TFilterData = void> extends Async
997
996
@IThemeService themeService : IThemeService ,
998
997
@IConfigurationService configurationService : IConfigurationService
999
998
) {
1000
- const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , container , options as any ) ;
999
+ const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , options as any ) ;
1001
1000
super ( user , container , delegate , renderers , dataSource , treeOptions ) ;
1002
1001
this . disposables . add ( disposable ) ;
1003
1002
this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -1042,7 +1041,7 @@ export class WorkbenchCompressibleAsyncDataTree<TInput, T, TFilterData = void> e
1042
1041
@IThemeService themeService : IThemeService ,
1043
1042
@IConfigurationService configurationService : IConfigurationService
1044
1043
) {
1045
- const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , container , options as any ) ;
1044
+ const { options : treeOptions , getTypeNavigationMode, disposable } = instantiationService . invokeFunction ( workbenchTreeDataPreamble , options as any ) ;
1046
1045
super ( user , container , virtualDelegate , compressionDelegate , renderers , dataSource , treeOptions ) ;
1047
1046
this . disposables . add ( disposable ) ;
1048
1047
this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -1077,11 +1076,9 @@ function getDefaultTreeFindMode(configurationService: IConfigurationService) {
1077
1076
1078
1077
function workbenchTreeDataPreamble < T , TFilterData , TOptions extends IAbstractTreeOptions < T , TFilterData > | IAsyncDataTreeOptions < T , TFilterData > > (
1079
1078
accessor : ServicesAccessor ,
1080
- container : HTMLElement ,
1081
1079
options : TOptions ,
1082
1080
) : { options : TOptions ; getTypeNavigationMode : ( ) => TypeNavigationMode | undefined ; disposable : IDisposable } {
1083
1081
const configurationService = accessor . get ( IConfigurationService ) ;
1084
- const keybindingService = accessor . get ( IKeybindingService ) ;
1085
1082
const contextViewService = accessor . get ( IContextViewService ) ;
1086
1083
const contextKeyService = accessor . get ( IContextKeyService ) ;
1087
1084
const instantiationService = accessor . get ( IInstantiationService ) ;
@@ -1107,7 +1104,7 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
1107
1104
} ;
1108
1105
1109
1106
const horizontalScrolling = options . horizontalScrolling !== undefined ? options . horizontalScrolling : Boolean ( configurationService . getValue ( horizontalScrollingKey ) ) ;
1110
- const [ workbenchListOptions , disposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , container , options ) ;
1107
+ const [ workbenchListOptions , disposable ] = instantiationService . invokeFunction ( toWorkbenchListOptions , options ) ;
1111
1108
const additionalScrollHeight = options . additionalScrollHeight ;
1112
1109
1113
1110
return {
@@ -1122,7 +1119,6 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
1122
1119
smoothScrolling : Boolean ( configurationService . getValue ( listSmoothScrolling ) ) ,
1123
1120
defaultFindMode : getDefaultTreeFindMode ( configurationService ) ,
1124
1121
horizontalScrolling,
1125
- keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( container , keybindingService ) ,
1126
1122
additionalScrollHeight,
1127
1123
hideTwistiesOfChildlessElements : options . hideTwistiesOfChildlessElements ,
1128
1124
expandOnlyOnTwistieClick : options . expandOnlyOnTwistieClick ?? ( configurationService . getValue < 'singleClick' | 'doubleClick' > ( treeExpandMode ) === 'doubleClick' ) ,
0 commit comments