[escher] In input view controller, do not handle when invisible

Change-Id: I5c235a1da638e5552dfa6b43bbce4d71e51ea5ce
This commit is contained in:
Émilie Feral
2016-10-12 18:04:28 +02:00
parent 9c92fa4604
commit ff0fc6eb2c

View File

@@ -98,21 +98,18 @@ void InputViewController::setTextBody(const char * text) {
}
bool InputViewController::handleEvent(Ion::Events::Event event) {
if (!m_contentView.visibleInput()) {
return false;
}
switch (event) {
case Ion::Events::Event::ENTER:
if (m_contentView.visibleInput()) {
m_successAction.perform(this);
showInput(false);
return true;
}
return false;
m_successAction.perform(this);
showInput(false);
return true;
case Ion::Events::Event::ESC:
if (m_contentView.visibleInput()) {
m_failureAction.perform(this);
showInput(false);
return true;
}
return false;
m_failureAction.perform(this);
showInput(false);
return true;
default:
return false;
}