Skip to content

Commit 7f138d5

Browse files
committed
Don't require text focus for copy paste actions
This prevents these actions from being reused by webviews
1 parent c5b9134 commit 7f138d5

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

src/vs/editor/contrib/clipboard/clipboard.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export const CutAction = supportsCut ? registerCommand(new MultiCommand({
4040
// Do not bind cut keybindings in the browser,
4141
// since browsers do that for us and it avoids security prompts
4242
platform.isNative ? {
43-
kbExpr: EditorContextKeys.textInputFocus,
4443
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
4544
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] },
4645
weight: KeybindingWeight.EditorContrib
@@ -72,7 +71,6 @@ export const CopyAction = supportsCopy ? registerCommand(new MultiCommand({
7271
// Do not bind copy keybindings in the browser,
7372
// since browsers do that for us and it avoids security prompts
7473
platform.isNative ? {
75-
kbExpr: EditorContextKeys.textInputFocus,
7674
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
7775
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
7876
weight: KeybindingWeight.EditorContrib
@@ -103,7 +101,6 @@ export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
103101
// Do not bind paste keybindings in the browser,
104102
// since browsers do that for us and it avoids security prompts
105103
platform.isNative ? {
106-
kbExpr: EditorContextKeys.textInputFocus,
107104
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
108105
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
109106
linux: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },

0 commit comments

Comments
 (0)