@@ -15,7 +15,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.1
19import "../../Components"
19import "../../Components"
21/*! \brief Preview widget for commenting.
21/*! \brief Preview widget for commenting.
@@ -33,9 +33,6 @@ PreviewWidget {
33 property alias commentText: commentTextArea.text
33 property alias commentText: commentTextArea.text
35 function submit() {
35 function submit() {
36− // checks if comment text area actually contains something
37− if (commentTextArea.text === "") return;
39 var data = { "comment": commentTextArea.text };
36 var data = { "comment": commentTextArea.text };
40 triggered(root.widgetId, "commented", data);
37 triggered(root.widgetId, "commented", data);
@@ -78,7 +75,7 @@ PreviewWidget {
78 id: submitButton
75 id: submitButton
79 objectName: "submitButton"
76 objectName: "submitButton"
81− readonly property bool readyToSubmit: commentTextArea.text.length > 0
78+ readonly property bool readyToSubmit: commentTextArea.text.trim().length > 0
84 top: parent.top
81 top: parent.top