From e92caf57bbad2af886b48d8ff82d8fece214b783 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 18 Nov 2015 18:39:25 +0100 Subject: Escape from editor using the escape key --- js/codeq/python.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/codeq/python.js') diff --git a/js/codeq/python.js b/js/codeq/python.js index bd5d96e..3c4caef 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -164,11 +164,15 @@ jqEditor = jqCode.find('.code_editor'), jqTerminal = jqConsole.find('.console'), jqHints = jqInfo.find('.hints'), - editor = codeq.makeEditor(jqEditor[0], { - mode: 'python', - indentUnit: 4, - value: currentSolution || '' - }), + editor = codeq.makeEditor(jqEditor[0], + { + mode: 'python', + indentUnit: 4, + value: currentSolution || '' + }, + function () { + jqTerminal.click() + }), activityHandler = codeq.makeActivityHandler(editor, problemDef.id), terminal = makePythonTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler), hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'python_hints', problemDef, commonDef), -- cgit v1.2.1