File tree 2 files changed +10
-4
lines changed
platform/contextkey/browser
workbench/contrib/notebook/browser/view/renderers
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,12 @@ class ScopedContextKeyService extends AbstractContextKeyService {
417
417
if ( domNode ) {
418
418
this . _domNode = domNode ;
419
419
if ( this . _domNode . hasAttribute ( KEYBINDING_CONTEXT_ATTR ) ) {
420
- console . error ( 'Element already has context attribute' ) ;
420
+ let extraInfo = '' ;
421
+ if ( ( this . _domNode as HTMLElement ) . classList ) {
422
+ extraInfo = Array . from ( ( this . _domNode as HTMLElement ) . classList . values ( ) ) . join ( ', ' ) ;
423
+ }
424
+
425
+ console . error ( `Element already has context attribute${ extraInfo ? ': ' + extraInfo : '' } ` ) ;
421
426
}
422
427
this . _domNode . setAttribute ( KEYBINDING_CONTEXT_ATTR , String ( this . _myContextId ) ) ;
423
428
}
Original file line number Diff line number Diff line change @@ -712,13 +712,14 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
712
712
713
713
const executionOrderLabel = DOM . append ( cellContainer , $ ( 'div.execution-count-label' ) ) ;
714
714
715
+ const editorPart = DOM . append ( cellContainer , $ ( '.cell-editor-part' ) ) ;
716
+ const editorContainer = DOM . append ( editorPart , $ ( '.cell-editor-container' ) ) ;
717
+
715
718
// create a special context key service that set the inCompositeEditor-contextkey
716
- const editorContextKeyService = disposables . add ( this . contextKeyServiceProvider ( container ) ) ;
719
+ const editorContextKeyService = disposables . add ( this . contextKeyServiceProvider ( editorPart ) ) ;
717
720
const editorInstaService = this . instantiationService . createChild ( new ServiceCollection ( [ IContextKeyService , editorContextKeyService ] ) ) ;
718
721
EditorContextKeys . inCompositeEditor . bindTo ( editorContextKeyService ) . set ( true ) ;
719
722
720
- const editorPart = DOM . append ( cellContainer , $ ( '.cell-editor-part' ) ) ;
721
- const editorContainer = DOM . append ( editorPart , $ ( '.cell-editor-container' ) ) ;
722
723
const editor = editorInstaService . createInstance ( CodeEditorWidget , editorContainer , {
723
724
...this . editorOptions . value ,
724
725
dimension : {
You can’t perform that action at this time.
0 commit comments