aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/virtualkeyboard/content/components/ShadowInputControl.qml2
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/virtualkeyboard/content/components/ShadowInputControl.qml b/src/virtualkeyboard/content/components/ShadowInputControl.qml
index a059c40e..95c1c97c 100644
--- a/src/virtualkeyboard/content/components/ShadowInputControl.qml
+++ b/src/virtualkeyboard/content/components/ShadowInputControl.qml
@@ -88,7 +88,7 @@ Item {
selectionColor: keyboard.style.fullScreenInputSelectionColor
selectedTextColor: keyboard.style.fullScreenInputSelectedTextColor
echoMode: (InputContext.inputMethodHints & Qt.ImhHiddenText) ? TextInput.Password : TextInput.Normal
- selectByMouse: true
+ selectByMouse: !!InputContext.inputItem.selectByMouse
onCursorPositionChanged: {
cursorSyncTimer.restart()
blinkStatus = true
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 44a718c0..a81341f4 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -104,6 +104,7 @@ Rectangle {
textInput.text = ""
}
textInput.inputMethodHints = data !== undefined && data.hasOwnProperty("initInputMethodHints") ? data.initInputMethodHints : Qt.ImhNone
+ textInput.selectByMouse = false
handwritingInputPanel.available = false
inputPanel.setHandwritingMode(false)
textInput.forceActiveFocus()
@@ -2078,6 +2079,18 @@ Rectangle {
compare(inputPanel.shadowInput.text, "")
}
+ function test_fullScreenModeSelectByMouse() {
+ prepareTest()
+
+ inputPanel.setFullScreenMode(true)
+
+ // The default value for TextInput/TextEdit is false.
+ compare(inputPanel.shadowInput.selectByMouse, false)
+
+ textInput.selectByMouse = true
+ compare(inputPanel.shadowInput.selectByMouse, true)
+ }
+
function test_userDictionary_data() {
return [
{ inputSequence: ['a','s','d','f'], initShift: false },