From 6a9b75019af879d610306aaadd68c8a2a8ed78d1 Mon Sep 17 00:00:00 2001 From: Thomas Wilburn Date: Thu, 5 Sep 2013 08:28:40 -0700 Subject: [PATCH] Fixes #11, but may revert if this proves inconvenient. --- js/editor.js | 1 + js/sessions.js | 1 + 2 files changed, 2 insertions(+) diff --git a/js/editor.js b/js/editor.js index 6309478..7c16fb4 100644 --- a/js/editor.js +++ b/js/editor.js @@ -57,6 +57,7 @@ define(["file", "command", "settings!ace,user", "dom2"], function(File, command, command.on("editor:theme", function(theme) { editor.setTheme("ace/theme/" + theme); + editor.focus(); }); //disable focusing on the editor except by program diff --git a/js/sessions.js b/js/sessions.js index 45d07dc..6996259 100644 --- a/js/sessions.js +++ b/js/sessions.js @@ -287,6 +287,7 @@ define([ command.on("session:syntax", function(mode) { editor.getSession().setMode("ace/mode/" + mode); + editor.focus(); }); command.on("session:new-file", function() { addTab() });