From 6a967e8adde97deb5cf44675b853eb2844ea5e1c Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 2 Sep 2019 07:48:50 -0500 Subject: [PATCH] Fix issue where speech for caret moves cuts off announcement of `LineEdit` field and content. --- addons/accessibility/accessible.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/accessibility/accessible.gd b/addons/accessibility/accessible.gd index 0a7c0ad..c39607e 100644 --- a/addons/accessibility/accessible.gd +++ b/addons/accessibility/accessible.gd @@ -87,13 +87,15 @@ var old_pos func check_caret_moved(): var pos = node.caret_position - if old_pos != pos: + if old_pos != null and old_pos != pos: var text = node.text if pos > len(text)-1: tts.speak("blank", true) else: tts.speak(text[pos], true) old_pos = pos + elif old_pos == null: + old_pos = pos func focus_menu_button(): tts.speak(node.text + ": menu", false)