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/prolog.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/codeq/prolog.js') diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js index a9a1c26..47a88b2 100644 --- a/js/codeq/prolog.js +++ b/js/codeq/prolog.js @@ -204,11 +204,15 @@ jqEditor = jqCode.find('.code_editor'), jqTerminal = jqConsole.find('.console'), jqHints = jqInfo.find('.hints'), - editor = codeq.makeEditor(jqEditor[0], { - mode: 'prolog', - indentUnit: 4, - value: currentSolution || '' - }), + editor = codeq.makeEditor(jqEditor[0], + { + mode: 'prolog', + indentUnit: 4, + value: currentSolution || '' + }, + function () { + jqTerminal.click(); + }), activityHandler = codeq.makeActivityHandler(editor, problemDef.id), terminal = makePrologTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler), hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'prolog_hints', problemDef, commonDef), -- cgit v1.2.1