@@ -61,8 +61,24 @@ Item {
6161 property real columnWidth: width / columns
6262
6363 Repeater {
64+ id: repeater;
6465 model: previewModel
6566
67+ function findChild(obj, objectName) {
68+ var childs = new Array(0);
69+ childs.push(obj)
70+ while (childs.length > 0) {
71+ if (childs[0].objectName === objectName) {
72+ return childs[0]
73+ }
74+ for (var i in childs[0].data) {
75+ childs.push(childs[0].data[i])
76+ }
77+ childs.splice(0, 1);
78+ }
79+ return null;
80+ }
81+
6682 delegate: ListView {
6783 id: column
6884 objectName: "previewListRow" + index
@@ -70,6 +86,39 @@ Item {
7086 width: row.columnWidth
7187 spacing: row.spacing
7288 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
89+
90+ readonly property int inputMethodMargin: 30;
91+ property bool inputMethodVisible: Qt.inputMethod.visible;
92+ onInputMethodVisibleChanged: {
93+ if (!inputMethodVisible)
94+ return;
95+
96+ var textArea = null;
97+ var contentItem = column.contentItem;
98+
99+ var reviewTextArea = repeater.findChild(contentItem, "reviewTextArea");
100+ if (reviewTextArea !== null && reviewTextArea.activeFocus) {
101+ textArea = reviewTextArea;
102+ }
103+
104+ if (textArea === null) {
105+ var commentTextArea = repeater.findChild(contentItem, "commentTextArea");
106+ if (commentTextArea !== null && commentTextArea.activeFocus) {
107+ textArea = commentTextArea;
108+ }
109+ }
110+
111+ if (textArea === null)
112+ return;
113+
114+ var textAreaPos = textArea.mapToItem(column, 0, 0);
115+ var textAreaGlobalHeight = textAreaPos.y + textArea.implicitHeight
116+ + column.height / 2.0;
117+
118+ if (textAreaGlobalHeight > column.height) {
119+ column.contentY += textAreaGlobalHeight - column.height + inputMethodMargin;
120+ }
121+ }
73122
74123 model: columnModel
75124 cacheBuffer: height