QML UI: explicitly hide the keyboard when exiting dive edit

If you save or cancel the dive edit, the keyboard should be closed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-05 10:49:43 -08:00
parent 48695cda7c
commit 7f70802b90
2 changed files with 3 additions and 0 deletions

View file

@ -49,10 +49,12 @@ MobileComponents.Page {
if (state === "edit") {
// just cancel the edit state
state = "view"
Qt.inputMethod.hide()
} else if (state === "add") {
// edit was canceled - so remove the dive from the dive list
manager.addDiveAborted(dive_id)
state = "view"
Qt.inputMethod.hide()
} else {
// set things up for editing - so make sure that the detailsEdit has
// all the right data (using the property aliases set up above)

View file

@ -183,6 +183,7 @@ Item {
diveDetailsListView.currentItem.modelData.divemaster = detailsEdit.divemasterText
diveDetailsListView.currentItem.modelData.notes = detailsEdit.notesText
diveDetailsPage.state = "view"
Qt.inputMethod.hide()
}
}
Item {