summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-27 10:47:15 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-27 10:47:15 -0600
commit70ea5713cf2aba739d0529d14a66c410edfd078c (patch)
tree3dd6a8d92a5a305aea6d86fc5b5f9f9ceeebb1e8
parent9e259ef0610b4434320413e06e954e5c50f27a83 (diff)
parent14dd5954476da8a9a40b8733cdeb04b66ca46c0e (diff)
downloadredot-engine-70ea5713cf2aba739d0529d14a66c410edfd078c.tar.gz
Merge pull request #98012 from syntaxerror247/lineEdit-bug-fix
Fix uneditable `LineEdit`, `TextEdit` and `CodeEdit` virtual keyboard popup on mobile
-rw-r--r--scene/gui/line_edit.cpp4
-rw-r--r--scene/gui/text_edit.cpp8
2 files changed, 9 insertions, 3 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index b7c7326172..b536e23b2c 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -550,7 +550,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 b8bb17eb2a..a33769eaa9 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1605,7 +1605,9 @@ void TextEdit::_notification(int p_what) {
draw_caret = true;
}
- _show_virtual_keyboard();
+ if (editable) {
+ _show_virtual_keyboard();
+ }
} break;
case NOTIFICATION_FOCUS_EXIT: {
@@ -2008,7 +2010,9 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
}
- _show_virtual_keyboard();
+ if (editable) {
+ _show_virtual_keyboard();
+ }
}
}