diff options
author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2019-12-04 17:08:18 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2019-12-05 16:06:09 +0100 |
commit | 6ca59d925a4f5d04004abd47bde662c08dd15a07 (patch) | |
tree | c1996bee35837a4dc33fb702e724574448342865 /src | |
parent | 7c6f5f874774ffb97657a3101e4ce17a4ef7f113 (diff) |
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 <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/virtualkeyboard/content/components/ShadowInputControl.qml | 2 |
1 files changed, 1 insertions, 1 deletions
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 |