diff --git a/app/qml/account/MMLoginPage.qml b/app/qml/account/MMLoginPage.qml index 98a17611a..2953eb765 100644 --- a/app/qml/account/MMLoginPage.qml +++ b/app/qml/account/MMLoginPage.qml @@ -85,7 +85,7 @@ MMPage { width: parent.width title: qsTr( "Email or username" ) - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhEmailCharactersOnly + textField.inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhEmailCharactersOnly } MMPasswordInput { @@ -204,7 +204,9 @@ MMPage { textFieldBackground.color: __style.lightGreenColor text: root.apiRoot - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly + + // Qt.ImhNoPredictiveText must be accompanied by Qt.ImhSensitiveData, see https://bugreports.qt.io/browse/QTBUG-86982 + textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhSensitiveData | Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly } MMListSpacer { height: __style.spacing40 } diff --git a/app/qml/account/MMSignUpPage.qml b/app/qml/account/MMSignUpPage.qml index cc5fd028b..0cb7f9001 100644 --- a/app/qml/account/MMSignUpPage.qml +++ b/app/qml/account/MMSignUpPage.qml @@ -72,7 +72,7 @@ MMPage { width: parent.width title: qsTr( "Username" ) - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase + textField.inputMethodHints: Qt.ImhNoAutoUppercase } MMTextInput { @@ -81,7 +81,7 @@ MMPage { width: parent.width title: qsTr( "Email" ) - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhEmailCharactersOnly + textField.inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhEmailCharactersOnly } MMPasswordInput { diff --git a/app/qml/form/editors/MMFormTextEditor.qml b/app/qml/form/editors/MMFormTextEditor.qml index 49eeb53a8..10ec5358e 100644 --- a/app/qml/form/editors/MMFormTextEditor.qml +++ b/app/qml/form/editors/MMFormTextEditor.qml @@ -44,7 +44,6 @@ MMPrivateComponents.MMBaseSingleLineInput { text: _fieldValue === undefined || _fieldValueIsNull ? '' : _fieldValue readOnly: _fieldIsReadOnly - textField.inputMethodHints: root._field.isNumeric ? Qt.ImhNoPredictiveText | Qt.ImhFormattedNumbersOnly : Qt.ImhNoPredictiveText title: _fieldShouldShowTitle ? _fieldTitle : "" @@ -75,6 +74,13 @@ MMPrivateComponents.MMBaseSingleLineInput { root.editorValueChanged( val, val === "" ) } + Component.onCompleted: { + // Use numerical keyboard for number fields configured as texts + if ( root._field.isNumeric ) { + textField.inputMethodHints |= Qt.ImhFormattedNumbersOnly + } + } + QtObject { id: internal diff --git a/app/qml/form/editors/MMFormTextMultilineEditor.qml b/app/qml/form/editors/MMFormTextMultilineEditor.qml index 04942d380..f93e54253 100644 --- a/app/qml/form/editors/MMFormTextMultilineEditor.qml +++ b/app/qml/form/editors/MMFormTextMultilineEditor.qml @@ -83,8 +83,6 @@ MMPrivateComponents.MMBaseInput { } placeholderTextColor: __style.darkGreyColor - inputMethodHints: Qt.ImhNoPredictiveText - readOnly: root.editState !== "enabled" background: Rectangle { diff --git a/app/qml/inputs/MMPasswordInput.qml b/app/qml/inputs/MMPasswordInput.qml index bc0850dc9..23729fd40 100644 --- a/app/qml/inputs/MMPasswordInput.qml +++ b/app/qml/inputs/MMPasswordInput.qml @@ -17,7 +17,8 @@ MMPrivateComponents.MMBaseSingleLineInput { textField.echoMode: eyeButton.pressed ? TextInput.Normal : TextInput.Password - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhHiddenText + // Qt.ImhNoPredictiveText must be accompanied by Qt.ImhSensitiveData, see https://bugreports.qt.io/browse/QTBUG-86982 + textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhSensitiveData | Qt.ImhNoAutoUppercase | Qt.ImhHiddenText rightContent: MMComponents.MMIcon { id: eyeButton diff --git a/app/qml/settings/components/MMSettingsInput.qml b/app/qml/settings/components/MMSettingsInput.qml index 1550fe880..b7da0313c 100644 --- a/app/qml/settings/components/MMSettingsInput.qml +++ b/app/qml/settings/components/MMSettingsInput.qml @@ -56,7 +56,7 @@ MMSettingsItem { textFieldBackground.color: __style.lightGreenColor text: root.value - textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase + textField.inputMethodHints: Qt.ImhNoAutoUppercase } MMComponents.MMListSpacer { height: __style.spacing40 }