From d6adb9b9c2ea95f3997df8fcdc667146c31904e9 Mon Sep 17 00:00:00 2001
From: Franklin Sobrinho <franklin_gs@hotmail.com>
Date: Wed, 27 Jan 2016 13:56:05 -0300
Subject: [PATCH] Fix input passing to script editor even if not visible

---
 tools/editor/plugins/script_editor_plugin.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 34d7e89760f..e6e90eb0dbf 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1694,7 +1694,7 @@ void ScriptEditor::ensure_select_current() {
 
 			Ref<Script> script = ste->get_edited_script();
 
-			if (!grab_focus_block && is_inside_tree())
+			if (!grab_focus_block && is_visible())
 				ste->get_text_edit()->grab_focus();
 
 			edit_menu->show();