From 6ca59d925a4f5d04004abd47bde662c08dd15a07 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 4 Dec 2019 17:08:18 +0100 Subject: Fix warning: TypeError: Cannot read property 'selectByMouse' of null When the item is undefined, we should not try to access it. Change-Id: I600130c6ed29beb93c9878298b0f1cf51f843d86 Reviewed-by: Mitch Curtis --- src/virtualkeyboard/content/components/ShadowInputControl.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/virtualkeyboard/content/components/ShadowInputControl.qml b/src/virtualkeyboard/content/components/ShadowInputControl.qml index 95c1c97c..e36cf3d3 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: !!InputContext.inputItem.selectByMouse + selectByMouse: !!InputContext.inputItem && !!InputContext.inputItem.selectByMouse onCursorPositionChanged: { cursorSyncTimer.restart() blinkStatus = true -- cgit v1.2.3