@@ -41,7 +41,7 @@ import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestCont
41
41
import * as nls from 'vs/nls' ;
42
42
import { MenuId } from 'vs/platform/actions/common/actions' ;
43
43
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
44
- import { IContextKey , IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
44
+ import { IContextKey , IContextKeyService , RawContextKey } from 'vs/platform/contextkey/common/contextkey' ;
45
45
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
46
46
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
47
47
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection' ;
@@ -102,6 +102,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
102
102
import { OutlineTarget } from 'vs/workbench/services/outline/browser/outline' ;
103
103
import { PixelRatio } from 'vs/base/browser/pixelRatio' ;
104
104
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService' ;
105
+ import { PreventDefaultContextMenuItemsContextKeyName } from 'vs/workbench/contrib/webview/browser/webview.contribution' ;
105
106
import { NotebookAccessibilityProvider } from 'vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider' ;
106
107
107
108
const $ = DOM . $ ;
@@ -420,6 +421,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
420
421
this . _outputInputFocus = NOTEBOOK_OUPTUT_INPUT_FOCUSED . bindTo ( this . scopedContextKeyService ) ;
421
422
this . _editorEditable = NOTEBOOK_EDITOR_EDITABLE . bindTo ( this . scopedContextKeyService ) ;
422
423
this . _cursorNavMode = NOTEBOOK_CURSOR_NAVIGATION_MODE . bindTo ( this . scopedContextKeyService ) ;
424
+ // Never display the native cut/copy context menu items in notebooks
425
+ new RawContextKey < boolean > ( PreventDefaultContextMenuItemsContextKeyName , false ) . bindTo ( this . scopedContextKeyService ) . set ( true ) ;
423
426
424
427
this . _editorEditable . set ( ! creationOptions . isReadOnly ) ;
425
428
0 commit comments