@@ -61,8 +61,24 @@ Item {
61 property real columnWidth: width / columns
61 property real columnWidth: width / columns
63 Repeater {
63 Repeater {
64 model: previewModel
65 model: previewModel
67+ function findChild(obj, objectName) {
68+ var childs = new Array(0);
70+ while (childs.length > 0) {
71+ if (childs[0].objectName === objectName) {
74+ for (var i in childs[0].data) {
75+ childs.push(childs[0].data[i])
66 delegate: ListView {
82 delegate: ListView {
67 id: column
83 id: column
68 objectName: "previewListRow" + index
84 objectName: "previewListRow" + index
@@ -70,6 +86,39 @@ Item {
70 width: row.columnWidth
86 width: row.columnWidth
71 spacing: row.spacing
87 spacing: row.spacing
72 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
88 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
90+ readonly property int inputMethodMargin: 30;
91+ property bool inputMethodVisible: Qt.inputMethod.visible;
92+ onInputMethodVisibleChanged: {
93+ if (!inputMethodVisible)
97+ var contentItem = column.contentItem;
99+ var reviewTextArea = repeater.findChild(contentItem, "reviewTextArea");
100+ if (reviewTextArea !== null && reviewTextArea.activeFocus) {
101+ textArea = reviewTextArea;
104+ if (textArea === null) {
105+ var commentTextArea = repeater.findChild(contentItem, "commentTextArea");
106+ if (commentTextArea !== null && commentTextArea.activeFocus) {
107+ textArea = commentTextArea;
111+ if (textArea === null)
114+ var textAreaPos = textArea.mapToItem(column, 0, 0);
115+ var textAreaGlobalHeight = textAreaPos.y + textArea.implicitHeight
116+ + column.height / 2.0;
118+ if (textAreaGlobalHeight > column.height) {
119+ column.contentY += textAreaGlobalHeight - column.height + inputMethodMargin;
74 model: columnModel
123 model: columnModel
75 cacheBuffer: height
124 cacheBuffer: height