Merge pull request #72378 from maximkulkin/line-edit-consume-events
Fix LineEdit not consuming events
This commit is contained in:
commit
008cafc103
1 changed files with 10 additions and 0 deletions
|
@ -274,6 +274,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
grab_focus();
|
grab_focus();
|
||||||
|
accept_event();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,6 +384,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<InputEventMouseMotion> m = p_event;
|
Ref<InputEventMouseMotion> m = p_event;
|
||||||
|
@ -407,6 +409,8 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
drag_caret_force_displayed = true;
|
drag_caret_force_displayed = true;
|
||||||
set_caret_at_pixel_pos(m->get_position().x);
|
set_caret_at_pixel_pos(m->get_position().x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<InputEventKey> k = p_event;
|
Ref<InputEventKey> k = p_event;
|
||||||
|
@ -460,6 +464,9 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
menu->reset_size();
|
menu->reset_size();
|
||||||
menu->popup();
|
menu->popup();
|
||||||
menu->grab_focus();
|
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) {
|
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
|
||||||
DisplayServer::get_singleton()->virtual_keyboard_hide();
|
DisplayServer::get_singleton()->virtual_keyboard_hide();
|
||||||
}
|
}
|
||||||
|
accept_event();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_shortcut_keys_enabled()) {
|
if (is_shortcut_keys_enabled()) {
|
||||||
|
@ -608,6 +617,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
_text_changed();
|
_text_changed();
|
||||||
}
|
}
|
||||||
accept_event();
|
accept_event();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue