Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.1
-
None
Description
With the code below the editor draw correctly when clicking and selecting text by dragging right, but not when dragging left of the click position.
Clicking left of the current cursor position also produce unexpected result.
Rectangle { width: 640; height: 480; Rectangle { anchors.centerIn: parent width: 400; height: 25; color: "blue" TextInput { anchors.fill: parent color: "white" focus: true text: "Sea Shepherd campaigner Peter Bethune faces 15 years in jail after boarding whaling ship" MouseArea { anchors.fill: parent onPressed: parent.selectionStart = parent.selectionEnd = parent.xToPosition(mouse.x); onPositionChanged: parent.selectionEnd = parent.xToPosition(mouse.x); } } } }