diff options
author | Anish Mishra <mishragames@gmail.com> | 2024-10-09 16:32:52 +0530 |
---|---|---|
committer | Anish Mishra <mishragames@gmail.com> | 2024-10-17 23:50:28 +0530 |
commit | 14dd5954476da8a9a40b8733cdeb04b66ca46c0e (patch) | |
tree | bde7269095a869a0cbdd040e3e1add3fc623d6de | |
parent | 04692d83cb8f61002f18ea1d954df8c558ee84f7 (diff) | |
download | redot-engine-14dd5954476da8a9a40b8733cdeb04b66ca46c0e.tar.gz |
Fix uneditable LineEdit, TexEdit and CodeEdit Virtual Keyboard popup
-rw-r--r-- | scene/gui/line_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 9967805134..7fe8633b2f 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -548,7 +548,9 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) { pending_select_all_on_focus = false; } - show_virtual_keyboard(); + if (editable) { + show_virtual_keyboard(); + } } queue_redraw(); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 6b5ff23436..f22258e4a0 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1598,7 +1598,9 @@ void TextEdit::_notification(int p_what) { draw_caret = true; } - _show_virtual_keyboard(); + if (editable) { + _show_virtual_keyboard(); + } } break; case NOTIFICATION_FOCUS_EXIT: { @@ -2001,7 +2003,9 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { } } - _show_virtual_keyboard(); + if (editable) { + _show_virtual_keyboard(); + } } } |