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
This commit is contained in:
parent
e3eb686906
commit
e15fe296bd
|
@ -373,12 +373,14 @@ void LineEdit::_gui_input(Ref<InputEvent> 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;
|
||||
|
|
Loading…
Reference in New Issue