File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 PreferenceScope ,
88 PreferenceProvider ,
99 IContextKeyService ,
10+ KeybindingService ,
1011} from '@opensumi/ide-core-browser' ;
1112import { ClientApp as BasicClientApp } from '@opensumi/ide-core-browser/lib/bootstrap/app' ;
1213
@@ -39,7 +40,6 @@ import {
3940 monacoCodeServiceProxy ,
4041} from './override/monacoOverride/codeEditorService' ;
4142import { ICodeEditorService } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService' ;
42- import { IKeybindingService } from '@opensumi/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding' ;
4343import { BreadCrumbServiceImplOverride , IBreadCrumbService } from './override/breadcrumb.service' ;
4444import { SearchContribution } from './search/index.contribution' ;
4545import {
@@ -150,7 +150,7 @@ export class ClientModule extends BrowserModule {
150150 useClass : MonacoCommandService ,
151151 } ,
152152 {
153- token : IKeybindingService ,
153+ token : KeybindingService ,
154154 useValue : customKeybindingService ,
155155 } ,
156156 // MonacoContextKeyService
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import { ICodeEditorService } from '@opensumi/monaco-editor-core/esm/vs/editor/b
99
1010class CustomKeybindingService extends StandaloneKeybindingService {
1111 constructor ( ) {
12+ const codeEditorService = StandaloneServices . get ( ICodeEditorService ) ;
13+
1214 super (
1315 StandaloneServices . get ( IContextKeyService ) ,
1416 StandaloneServices . get ( ICommandService ) ,
@@ -17,6 +19,12 @@ class CustomKeybindingService extends StandaloneKeybindingService {
1719 StandaloneServices . get ( ILogService ) ,
1820 StandaloneServices . get ( ICodeEditorService )
1921 ) ;
22+
23+ codeEditorService . onCodeEditorAdd ( ( ) => {
24+ this [ '_domNodeListeners' ] . forEach ( ( d ) => {
25+ d . dispose ( ) ;
26+ } ) ;
27+ } ) ;
2028 }
2129}
2230
You can’t perform that action at this time.
0 commit comments