diff --git a/examples/quick/controls/texteditor/qml/main.qml b/examples/quick/controls/texteditor/qml/main.qml
index 1a66afa5874820b58a3f94c9be01260bcde8f69f..26e22e984c978ae5862f65e7b64e92234d8cb82a 100644
--- a/examples/quick/controls/texteditor/qml/main.qml
+++ b/examples/quick/controls/texteditor/qml/main.qml
@@ -272,16 +272,19 @@ ApplicationWindow {
                 implicitWidth: 150
                 model: Qt.fontFamilies()
                 property bool special : false
-                onCurrentTextChanged: {
-                    if (special == false || currentIndex != 0)
-                        document.fontFamily = currentText
+                onActivated: {
+                    if (special == false || index != 0) {
+                        document.fontFamily = textAt(index)
+                    }
                 }
             }
             SpinBox {
                 id: fontSizeSpinBox
+                activeFocusOnPress: false
                 implicitWidth: 50
                 value: 0
-                onValueChanged: document.fontSize = value
+                property bool valueGuard: true
+                onValueChanged: if (valueGuard) document.fontSize = value
             }
             Item { Layout.fillWidth: true }
         }
@@ -307,7 +310,11 @@ ApplicationWindow {
         selectionStart: textArea.selectionStart
         selectionEnd: textArea.selectionEnd
         Component.onCompleted: document.fileUrl = "qrc:/example.html"
-        onFontSizeChanged: fontSizeSpinBox.value = document.fontSize
+        onFontSizeChanged: {
+            fontSizeSpinBox.valueGuard = false
+            fontSizeSpinBox.value = document.fontSize
+            fontSizeSpinBox.valueGuard = true
+        }
         onFontFamilyChanged: {
             var index = Qt.fontFamilies().indexOf(document.fontFamily)
             if (index == -1) {