From e15fe296bdbcbab038fe0a918a3cb739826e8271 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 12 Jan 2018 02:53:03 +0100 Subject: [PATCH] Line edit up/down focus pass through When line edit receive a up/down and the cursor is at beginning/end it will not set the input as handled --- scene/gui/line_edit.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 03dc6686b8b..5c0e8fefc70 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -373,12 +373,14 @@ void LineEdit::_gui_input(Ref p_event) { case KEY_UP: { shift_selection_check_pre(k->get_shift()); + if (get_cursor_position() == 0) handled = false; set_cursor_position(0); shift_selection_check_post(k->get_shift()); } break; case KEY_DOWN: { shift_selection_check_pre(k->get_shift()); + if (get_cursor_position() == text.length()) handled = false; set_cursor_position(text.length()); shift_selection_check_post(k->get_shift()); } break;