Ctrl-A - Select All shortcut does not work in preview mode for markdown documents (fixes #2113)

This commit is contained in:
Benjamin Pasero
2016-01-20 10:42:48 +01:00
parent 8e30f18be1
commit 5454f5365f
2 changed files with 2 additions and 2 deletions
@@ -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; })) {',