提交 5454f536 编写于 作者: B Benjamin Pasero

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

上级 8e30f18b
......@@ -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; })) {',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册