Fix issue where speech for caret moves cuts off announcement of LineEdit field and content.

This commit is contained in:
Nolan Darilek 2019-09-02 07:48:50 -05:00
parent 9817ee0e80
commit 6a967e8add

View File

@ -87,13 +87,15 @@ var old_pos
func check_caret_moved(): func check_caret_moved():
var pos = node.caret_position var pos = node.caret_position
if old_pos != pos: if old_pos != null and old_pos != pos:
var text = node.text var text = node.text
if pos > len(text)-1: if pos > len(text)-1:
tts.speak("blank", true) tts.speak("blank", true)
else: else:
tts.speak(text[pos], true) tts.speak(text[pos], true)
old_pos = pos old_pos = pos
elif old_pos == null:
old_pos = pos
func focus_menu_button(): func focus_menu_button():
tts.speak(node.text + ": menu", false) tts.speak(node.text + ": menu", false)