Skip to content

Commit

Permalink
When activating page if there are no results set focus in search elem…
Browse files Browse the repository at this point in the history
…ent, if not, hide the keyboard
  • Loading branch information
Iktwo committed Sep 17, 2014
1 parent 5b44859 commit d9210dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qml/SearchPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ Page {
}
}

onActivated: Qt.inputMethod.hide()
onActivated: {
if (!resultsList.count)
textEdit.focus = true
else
Qt.inputMethod.hide()
}

titleBar: TitleBar {
enabled: parent.enabled
Expand Down

0 comments on commit d9210dd

Please sign in to comment.