mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
mobile/UI: trigger position check on focus
Doing this check every time we get a 'pressed' signal for the input field seems excessive. We really only need to check when the input field gets focus - that's when the OS virtual keyboard might open and hide the field the user wants to edit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bb1fb86f20
commit
d5a7ceb433
1 changed files with 4 additions and 3 deletions
|
@ -20,9 +20,10 @@ Controls.TextField {
|
|||
firstTime = true
|
||||
}
|
||||
|
||||
// that's when a user taps on the field to start entering text
|
||||
onPressed: {
|
||||
if (flickable !== undefined) {
|
||||
// once a text input has focus, make sure it is visible
|
||||
// we do this via a timer to give the OS time to show a virtual keyboard
|
||||
onFocusChanged: {
|
||||
if (focus && flickable !== undefined) {
|
||||
waitForKeyboard.start()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue