summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-10 15:08:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-10 15:08:28 +0100
commit008cafc10323d64665e7209be4af11f660ab5f45 (patch)
tree3c5f129d3515f41b19529175d22a7bb162afe821 /scene/gui
parent29d89caafe2dece0e4e371c3a978ad0f65d9680e (diff)
parent5adc7e397e9df3b8e2fb13e9c35836fb1ab69c17 (diff)
Merge pull request #72378 from maximkulkin/line-edit-consume-events
Fix LineEdit not consuming events
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/line_edit.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 16a718722c..a57dccd5c8 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -274,6 +274,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
}
}
grab_focus();
+ accept_event();
return;
}
@@ -383,6 +384,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
}
queue_redraw();
+ return;
}
Ref<InputEventMouseMotion> m = p_event;
@@ -407,6 +409,8 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
drag_caret_force_displayed = true;
set_caret_at_pixel_pos(m->get_position().x);
}
+
+ return;
}
Ref<InputEventKey> k = p_event;
@@ -460,6 +464,9 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
menu->reset_size();
menu->popup();
menu->grab_focus();
+
+ accept_event();
+ return;
}
}
@@ -469,6 +476,8 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
DisplayServer::get_singleton()->virtual_keyboard_hide();
}
+ accept_event();
+ return;
}
if (is_shortcut_keys_enabled()) {
@@ -608,6 +617,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
_text_changed();
}
accept_event();
+ return;
}
}
}