diff --git a/src/controls/Private/TextHandle.qml b/src/controls/Private/TextHandle.qml index 19fc19a6d74523ec7f168402b7820320ef5afc54..8656dcfd86f4e301052e253d9e6db5376e95c521 100644 --- a/src/controls/Private/TextHandle.qml +++ b/src/controls/Private/TextHandle.qml @@ -75,7 +75,7 @@ Loader { MouseArea { id: mouse anchors.fill: item - enabled: handle.active + enabled: item && item.visible preventStealing: true property real pressX property point offset diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml index ceb63084f5f2f3a99eb4d23e52a50df9d7de2238..726b6863e202421d2adb7c4fed80557e28d9a0c2 100644 --- a/src/controls/Private/TextInputWithHandles.qml +++ b/src/controls/Private/TextInputWithHandles.qml @@ -170,7 +170,7 @@ TextInput { x: mappedPos.x y: mappedPos.y - visible: pressed || (input.hasSelection && handleX + handleWidth >= -1 && handleX <= control.width + 1) + visible: pressed || ((input.cursorVisible || input.hasSelection) && handleX + handleWidth >= -1 && handleX <= control.width + 1) onPositionChanged: { if (!input.blockRecursion) { diff --git a/src/controls/Styles/iOS/CursorHandleStyle.qml b/src/controls/Styles/iOS/CursorHandleStyle.qml index 26ab972823b886e2a105a1b53a18cd91286fd7b3..408a7bf462e5fd00694bd37d24f72de9168bf9ff 100644 --- a/src/controls/Styles/iOS/CursorHandleStyle.qml +++ b/src/controls/Styles/iOS/CursorHandleStyle.qml @@ -45,6 +45,7 @@ Item { y: -20 width: 80 height: knob.height + knobLine.height + 60 + visible: styleData.hasSelection Rectangle { id: knob diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index 8cfb6dfdf4ed52165a5e440358251d7a64b57e29..691bf13e1f5b43076fc530ad4df1cbd94b2d4356 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -933,7 +933,7 @@ ScrollView { property var posInViewport: flickableItem.contentX !== flickableItem.contentY !== Number.MAX_VALUE ? parent.mapToItem(viewport, handleX, handleY) : -1 - visible: pressed || (edit.hasSelection + visible: pressed || ((edit.cursorVisible || edit.hasSelection) && posInViewport.y + handleHeight >= -1 && posInViewport.y <= viewport.height + 1 && posInViewport.x + handleWidth >= -1