File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,16 @@ func _initKeyboard(config_value: String):
130
130
var focused_control : Control = null
131
131
var focused_window : Window = null
132
132
133
+ func handle_default_text_nodes (enabled : bool ):
134
+ if focused_control and (
135
+ focused_control is LineEdit or focused_control is TextEdit
136
+ ):
137
+ focused_control .caret_force_displayed = enabled
138
+
133
139
func show_keyboard (focused_control : Control ):
140
+ handle_default_text_nodes (false )
134
141
self .focused_control = focused_control
142
+ handle_default_text_nodes (true )
135
143
visible = true
136
144
137
145
# Set window transience
@@ -140,6 +148,7 @@ func show_keyboard(focused_control: Control):
140
148
# Skip current frame to avoid double input when opening the keyboard
141
149
142
150
func hide_keyboard ():
151
+ handle_default_text_nodes (false )
143
152
await _hideKeyboard ()
144
153
if focused_window :
145
154
focused_window .grab_focus ()
You can’t perform that action at this time.
0 commit comments