~canonical-platform-qa/ubuntu-ui-toolkit/fix_keyboard_bug1523501

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/1.3/TextField.qml

Don't set activeFocusOnPress on TextField but on child only. Fixes: https://bugs.launchpad.net/bugs/1486274, https://bugs.launchpad.net/bugs/1513897.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
    property alias acceptableInput: editor.acceptableInput
173
173
 
174
174
    /*!
 
175
      Whether the TextField should gain active focus on a mouse press. By default
 
176
      this is set to true.
 
177
      \qmlproperty bool activeFocusOnPress
 
178
    */
 
179
    property alias activeFocusOnPress: editor.activeFocusOnPress
 
180
 
 
181
    /*!
175
182
      Whether the TextField should scroll when the text is longer than the width.
176
183
      By default this is set to true.
177
184
 
810
817
 
811
818
    opacity: enabled ? 1.0 : 0.3
812
819
    activeFocusOnPress: true
 
820
    activeFocusOnTab: true
813
821
 
814
822
    /*! \internal */
815
823
    onVisibleChanged: {
871
879
                children[i].parent = leftPane;
872
880
                children[i].anchors.verticalCenter = verticalCenter;
873
881
                children[i].activeFocusOnPress = false;
 
882
                children[i].activeFocusOnTab = false;
874
883
            }
875
884
        }
876
885
    }
894
903
                children[i].parent = rightPane;
895
904
                children[i].anchors.verticalCenter = verticalCenter;
896
905
                children[i].activeFocusOnPress = false;
 
906
                children[i].activeFocusOnTab = false;
897
907
            }
898
908
        }
899
909
    }
902
912
        id: clearButton
903
913
        objectName: "clear_button"
904
914
        activeFocusOnPress: false
 
915
        activeFocusOnTab: false
905
916
 
906
917
        anchors {
907
918
            top: parent.top
995
1006
 
996
1007
            // overrides
997
1008
            selectByMouse: true
998
 
            activeFocusOnPress: control.activeFocusOnPress
 
1009
            activeFocusOnPress: true
999
1010
            onActiveFocusChanged: if (!activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)
1000
1011
 
1001
1012
            // input selection and navigation handling