From c81d3fc4a420d1b0aaf3e90ba0db67c6e7113e5d Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 Jun 2018 21:31:59 +0000 Subject: [PATCH] Ensure initial focus is a Control. --- addons/accessibility/accessibility.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/accessibility/accessibility.gd b/addons/accessibility/accessibility.gd index d9ed5b7..835162c 100644 --- a/addons/accessibility/accessibility.gd +++ b/addons/accessibility/accessibility.gd @@ -19,9 +19,10 @@ func set_initial_screen_focus(screen): augment_tree(root) if screen == "3D": focus = root.find_node("ToolButton", true, false) - print("Focus ",focus) - focus.grab_click_focus() - focus.grab_focus() + if focus is Control: + print("Focus ",focus) + focus.grab_click_focus() + focus.grab_focus() func set_initial_scene_focus(scene): print("Set focus in scene")