@@ -189,7 +189,6 @@ class MultipleSelectionController<T> extends Disposable implements IMultipleSele
189189
190190function toWorkbenchListOptions < T > (
191191 accessor : ServicesAccessor ,
192- container : HTMLElement ,
193192 options : IListOptions < T > ,
194193) : [ IListOptions < T > , IDisposable ] {
195194 const configurationService = accessor . get ( IConfigurationService ) ;
@@ -203,7 +202,7 @@ function toWorkbenchListOptions<T>(
203202 mouseWheelScrollSensitivity : configurationService . getValue < number > ( mouseWheelScrollSensitivityKey ) ,
204203 fastScrollSensitivity : configurationService . getValue < number > ( fastScrollSensitivityKey ) ,
205204 multipleSelectionController : options . multipleSelectionController ?? disposables . add ( new MultipleSelectionController ( configurationService ) ) ,
206- keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( container , keybindingService ) ,
205+ keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( keybindingService ) ,
207206 } ;
208207
209208 return [ result , disposables ] ;
@@ -244,7 +243,7 @@ export class WorkbenchList<T> extends List<T> {
244243 @IInstantiationService instantiationService : IInstantiationService
245244 ) {
246245 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 ) ;
248247
249248 super ( user , container , delegate , renderers ,
250249 {
@@ -384,7 +383,7 @@ export class WorkbenchPagedList<T> extends PagedList<T> {
384383 @IInstantiationService instantiationService : IInstantiationService
385384 ) {
386385 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 ) ;
388387 super ( user , container , delegate , renderers ,
389388 {
390389 keyboardSupport : false ,
@@ -517,7 +516,7 @@ export class WorkbenchTable<TRow> extends Table<TRow> {
517516 @IInstantiationService instantiationService : IInstantiationService
518517 ) {
519518 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 ) ;
521520
522521 super ( user , container , delegate , columns , renderers ,
523522 {
@@ -812,7 +811,7 @@ class TreeResourceNavigator<T, TFilterData> extends ResourceNavigator<T> {
812811 }
813812}
814813
815- function createKeyboardNavigationEventFilter ( container : HTMLElement , keybindingService : IKeybindingService ) : IKeyboardNavigationEventFilter {
814+ function createKeyboardNavigationEventFilter ( keybindingService : IKeybindingService ) : IKeyboardNavigationEventFilter {
816815 let inChord = false ;
817816
818817 return event => {
@@ -825,7 +824,7 @@ function createKeyboardNavigationEventFilter(container: HTMLElement, keybindingS
825824 return false ;
826825 }
827826
828- const result = keybindingService . softDispatch ( event , container ) ;
827+ const result = keybindingService . softDispatch ( event , event . target ) ;
829828
830829 if ( result ?. enterChord ) {
831830 inChord = true ;
@@ -862,7 +861,7 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
862861 @IThemeService themeService : IThemeService ,
863862 @IConfigurationService configurationService : IConfigurationService
864863 ) {
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 ) ;
866865 super ( user , container , delegate , renderers , treeOptions ) ;
867866 this . disposables . add ( disposable ) ;
868867 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
903902 @IThemeService themeService : IThemeService ,
904903 @IConfigurationService configurationService : IConfigurationService
905904 ) {
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 ) ;
907906 super ( user , container , delegate , renderers , treeOptions ) ;
908907 this . disposables . add ( disposable ) ;
909908 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
950949 @IThemeService themeService : IThemeService ,
951950 @IConfigurationService configurationService : IConfigurationService
952951 ) {
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 ) ;
954953 super ( user , container , delegate , renderers , dataSource , treeOptions ) ;
955954 this . disposables . add ( disposable ) ;
956955 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
997996 @IThemeService themeService : IThemeService ,
998997 @IConfigurationService configurationService : IConfigurationService
999998 ) {
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 ) ;
10011000 super ( user , container , delegate , renderers , dataSource , treeOptions ) ;
10021001 this . disposables . add ( disposable ) ;
10031002 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
10421041 @IThemeService themeService : IThemeService ,
10431042 @IConfigurationService configurationService : IConfigurationService
10441043 ) {
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 ) ;
10461045 super ( user , container , virtualDelegate , compressionDelegate , renderers , dataSource , treeOptions ) ;
10471046 this . disposables . add ( disposable ) ;
10481047 this . internals = new WorkbenchTreeInternals ( this , options , getTypeNavigationMode , options . overrideStyles , contextKeyService , listService , themeService , configurationService ) ;
@@ -1077,11 +1076,9 @@ function getDefaultTreeFindMode(configurationService: IConfigurationService) {
10771076
10781077function workbenchTreeDataPreamble < T , TFilterData , TOptions extends IAbstractTreeOptions < T , TFilterData > | IAsyncDataTreeOptions < T , TFilterData > > (
10791078 accessor : ServicesAccessor ,
1080- container : HTMLElement ,
10811079 options : TOptions ,
10821080) : { options : TOptions ; getTypeNavigationMode : ( ) => TypeNavigationMode | undefined ; disposable : IDisposable } {
10831081 const configurationService = accessor . get ( IConfigurationService ) ;
1084- const keybindingService = accessor . get ( IKeybindingService ) ;
10851082 const contextViewService = accessor . get ( IContextViewService ) ;
10861083 const contextKeyService = accessor . get ( IContextKeyService ) ;
10871084 const instantiationService = accessor . get ( IInstantiationService ) ;
@@ -1107,7 +1104,7 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
11071104 } ;
11081105
11091106 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 ) ;
11111108 const additionalScrollHeight = options . additionalScrollHeight ;
11121109
11131110 return {
@@ -1122,7 +1119,6 @@ function workbenchTreeDataPreamble<T, TFilterData, TOptions extends IAbstractTre
11221119 smoothScrolling : Boolean ( configurationService . getValue ( listSmoothScrolling ) ) ,
11231120 defaultFindMode : getDefaultTreeFindMode ( configurationService ) ,
11241121 horizontalScrolling,
1125- keyboardNavigationEventFilter : createKeyboardNavigationEventFilter ( container , keybindingService ) ,
11261122 additionalScrollHeight,
11271123 hideTwistiesOfChildlessElements : options . hideTwistiesOfChildlessElements ,
11281124 expandOnlyOnTwistieClick : options . expandOnlyOnTwistieClick ?? ( configurationService . getValue < 'singleClick' | 'doubleClick' > ( treeExpandMode ) === 'doubleClick' ) ,
0 commit comments