Browse Source

Drop focus after virtual keyboard is done

Some android versions leave a focus arrow indicator turd in the
control. This gets rid of it.
QGC4.4
Don Gagne 8 years ago
parent
commit
5ee3a9f567
  1. 4
      src/FactSystem/FactControls/FactTextField.qml
  2. 7
      src/QmlControls/QGCTextField.qml

4
src/FactSystem/FactControls/FactTextField.qml

@ -26,6 +26,10 @@ QGCTextField { @@ -26,6 +26,10 @@ QGCTextField {
Qt.ImhFormattedNumbersOnly // Forces use of virtual numeric keyboard
onEditingFinished: {
if (ScreenTools.isMobile) {
// Toss focus on mobile after Done on virtual keyboard. Prevent strange interactions.
focus = false
}
if (typeof qgcView !== 'undefined' && qgcView) {
var errorString = fact.validate(text, false /* convertOnly */)
if (errorString == "") {

7
src/QmlControls/QGCTextField.qml

@ -29,6 +29,13 @@ TextField { @@ -29,6 +29,13 @@ TextField {
implicitHeight: ScreenTools.implicitTextFieldHeight
onEditingFinished: {
if (ScreenTools.isMobile) {
// Toss focus on mobile after Done on virtual keyboard. Prevent strange interactions.
focus = false
}
}
QGCLabel {
id: unitsLabelWidthGenerator
text: unitsLabel

Loading…
Cancel
Save