@@ -61,16 +61,31 @@ Item {
6161 property real columnWidth: width / columns
6262
6363 Repeater {
64− id: repeater;
6564 model: previewModel
66−
65+
6766 delegate: ListView {
6867 id: column
6968 objectName: "previewListRow" + index
70− anchors { top: parent.top; bottom: parent.bottom }
69+ anchors {
70+ top: parent.top
71+ bottom: parent.bottom
72+ bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
73+ }
7174 width: row.columnWidth
7275 spacing: row.spacing
73− bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
76+ property var makeSureVisibleItem
77+ property real previousVisibleHeight: 0
78+ property real visibleHeight: height - bottomMargin
79+ onVisibleHeightChanged: {
80+ if (makeSureVisibleItem && makeSureVisibleItem.activeFocus && previousVisibleHeight > visibleHeight) {
81+ var textAreaPos = makeSureVisibleItem.mapToItem(column, 0, 0);
82+ if (textAreaPos.y + makeSureVisibleItem.height > column.visibleHeight) {
83+ column.contentY += textAreaPos.y + makeSureVisibleItem.height - column.visibleHeight
84+ }
85+ }
86+ previousVisibleHeight = visibleHeight;
87+ }
88+
7489 model: columnModel
7590 cacheBuffer: height
7691
@@ -82,8 +97,6 @@ Item {
8297 widgetData: model.properties
8398 isCurrentPreview: root.isCurrent
8499 scopeStyle: root.scopeStyle
85− readonly property int inputMethodMargin: units.gu(2);
86−
87100 anchors {
88101 left: parent.left
89102 right: parent.right
@@ -94,16 +107,10 @@ Item {
94107 onTriggered: {
95108 previewModel.triggered(widgetId, actionId, data);
96109 }
97−
98− onMakeSureVisible: {
99− var textAreaPos = item.mapToItem(column, 0, 0);
100− var textAreaGlobalHeight = textAreaPos.y + item.implicitHeight
101− + column.height / 2.0;
102−
103− if (textAreaGlobalHeight > column.height) {
104− column.contentY += textAreaGlobalHeight - column.height + inputMethodMargin;
105− }
106− }
110+ onMakeSureVisible: {
111+ column.previousVisibleHeight=column.visibleHeight
112+ column.makeSureVisibleItem=item
113+ }
107114
108115 onFocusChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
109116