mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Ctrl-A - Select All shortcut does not work in preview mode for markdown documents (fixes #2113)
This commit is contained in:
@@ -138,7 +138,7 @@ export class IFrameEditor extends BaseEditor {
|
||||
return [
|
||||
'<script>',
|
||||
'var ignoredKeys = [9 /* tab */, 32 /* space */, 33 /* page up */, 34 /* page down */, 38 /* up */, 40 /* down */];',
|
||||
'var ignoredCtrlCmdKeys = [67 /* c */];',
|
||||
'var ignoredCtrlCmdKeys = [65 /* a */, 67 /* c */];',
|
||||
'window.document.body.addEventListener("keydown", function(event) {', // Listen to keydown events in the iframe
|
||||
' try {',
|
||||
' if (ignoredKeys.some(function(i) { return i === event.keyCode; })) {',
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Integration {
|
||||
|
||||
const scriptSource = [
|
||||
'var ignoredKeys = [32 /* space */, 33 /* page up */, 34 /* page down */, 38 /* up */, 40 /* down */];',
|
||||
'var ignoredCtrlCmdKeys = [67 /* c */];',
|
||||
'var ignoredCtrlCmdKeys = [65 /* a */, 67 /* c */];',
|
||||
'window.document.body.addEventListener("keydown", function(event) {', // Listen to keydown events in the iframe
|
||||
' try {',
|
||||
' if (ignoredKeys.some(function(i) { return i === event.keyCode; })) {',
|
||||
|
||||
Reference in New Issue
Block a user