mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
mobile/UI: don't show virtual keyboard when starting dive edit
When we start editing a dive the OS will open the virtual keyboard if any of the input fields have focus (which they might get when we set their content). The explicit closing of the keyboard might be overkill, but also doesn't appear to hurt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d6456d490f
commit
1771c39dd8
2 changed files with 8 additions and 1 deletions
|
@ -382,7 +382,7 @@ Kirigami.Page {
|
|||
cylinderIndex4 = modelData.cylinderList.indexOf(usedCyl[4])
|
||||
rating = modelData.rating
|
||||
visibility = modelData.viz
|
||||
|
||||
detailsEdit.focusReset()
|
||||
diveDetailsPage.state = "edit"
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,13 @@ Item {
|
|||
property int visibility
|
||||
property var usedCyl: []
|
||||
|
||||
function focusReset() {
|
||||
// set the focus explicitlt (to steal from any other field), then unset
|
||||
editArea.focus = true
|
||||
editArea.focus = false
|
||||
Qt.inputMethod.hide()
|
||||
}
|
||||
|
||||
function clearDetailsEdit() {
|
||||
detailsEdit.dive_id = 0
|
||||
detailsEdit.number = 0
|
||||
|
|
Loading…
Add table
Reference in a new issue