Fix missusing for CodeMirror.Pass

This commit is contained in:
Cheng-Han, Wu 2016-04-28 11:10:09 +08:00
parent efb188c9c1
commit 7aa21c8f19

View file

@ -9,10 +9,10 @@ var defaultExtraKeys = {
else if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); else if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}, },
"Cmd-S": function () { "Cmd-S": function () {
return CodeMirror.Pass return false;
}, },
"Ctrl-S": function () { "Ctrl-S": function () {
return CodeMirror.Pass return false;
}, },
"Enter": "newlineAndIndentContinueMarkdownList", "Enter": "newlineAndIndentContinueMarkdownList",
"Tab": function (cm) { "Tab": function (cm) {
@ -2905,19 +2905,19 @@ $(editor.getInputField())
$(this).data('autocompleting', true); $(this).data('autocompleting', true);
editor.setOption("extraKeys", { editor.setOption("extraKeys", {
"Up": function () { "Up": function () {
return CodeMirror.Pass; return false;
}, },
"Right": function () { "Right": function () {
editor.doc.cm.execCommand("goCharRight"); editor.doc.cm.execCommand("goCharRight");
}, },
"Down": function () { "Down": function () {
return CodeMirror.Pass; return false;
}, },
"Left": function () { "Left": function () {
editor.doc.cm.execCommand("goCharLeft"); editor.doc.cm.execCommand("goCharLeft");
}, },
"Enter": function () { "Enter": function () {
return CodeMirror.Pass; return false;
}, },
"Backspace": function () { "Backspace": function () {
editor.doc.cm.execCommand("delCharBefore"); editor.doc.cm.execCommand("delCharBefore");