fix cursor positioning on reedit using keyboard ENTER
This commit is contained in:
committed by
Raphael Coeffic
parent
b4686686fc
commit
17910bc48c
+2
-1
@@ -64,6 +64,7 @@ TextEdit::TextEdit(Window *parent, const rect_t &rect, char *value,
|
||||
|
||||
void TextEdit::setCursorPos(int cursorPos)
|
||||
{
|
||||
this->cursorPos = cursorPos;
|
||||
lv_textarea_set_cursor_pos(lvobj, cursorPos);
|
||||
}
|
||||
|
||||
@@ -208,8 +209,8 @@ void TextEdit::onEvent(event_t event)
|
||||
}
|
||||
}
|
||||
else {
|
||||
setCursorPos(0);
|
||||
FormField::onEvent(event);
|
||||
setCursorPos(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user