[escher] Fix bug in textField

Change-Id: I08a674bb36118b6f545077f65679597bd36f2884
This commit is contained in:
Émilie Feral
2017-04-25 09:36:25 +02:00
parent 5f2f903c4d
commit 102fa8d46f

View File

@@ -280,9 +280,6 @@ bool TextField::handleEvent(Ion::Events::Event event) {
if (Responder::handleEvent(event)) {
return true;
}
if (m_delegate->textFieldDidReceiveEvent(this, event)) {
return true;
}
if (event == Ion::Events::Left && isEditing() && cursorLocation() > 0) {
setCursorLocation(cursorLocation()-1);
return true;
@@ -291,6 +288,9 @@ bool TextField::handleEvent(Ion::Events::Event event) {
setCursorLocation(cursorLocation()+1);
return true;
}
if (m_delegate->textFieldDidReceiveEvent(this, event)) {
return true;
}
if (textFieldShouldFinishEditing(event) && isEditing()) {
char bufferText[ContentView::k_maxBufferSize];
strlcpy(bufferText, m_contentView.textBuffer(), ContentView::k_maxBufferSize);