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/robot.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/codeq/robot.js') diff --git a/js/codeq/robot.js b/js/codeq/robot.js index be164ee..88e889d 100644 --- a/js/codeq/robot.js +++ b/js/codeq/robot.js @@ -136,11 +136,15 @@ var jqDescriptionContent = jqDescription.find('.description'), jqEditor = jqCode.find('.code_editor'), 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 () { + jqBtnRun.focus(); + }), activityHandler = codeq.makeActivityHandler(editor, problemDef.id), hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'robot_hints', problemDef, commonDef), commError = function (error) { -- cgit v1.2.1