From a964d955f41ee36ba12a1a5db615f71ced7f5c83 Mon Sep 17 00:00:00 2001 From: ronoaer Date: Mon, 11 Sep 2023 23:49:50 +0800 Subject: [PATCH] fixed scroll stuck on textarea in page OpenVpnSettings --- client/ui/qml/Controls2/TextAreaType.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/client/ui/qml/Controls2/TextAreaType.qml b/client/ui/qml/Controls2/TextAreaType.qml index a75ea55d3..9b9921f81 100644 --- a/client/ui/qml/Controls2/TextAreaType.qml +++ b/client/ui/qml/Controls2/TextAreaType.qml @@ -15,6 +15,9 @@ Rectangle { radius: 16 FlickableType { + id: fl + interactive: false + anchors.top: parent.top anchors.bottom: parent.bottom contentHeight: textArea.implicitHeight @@ -46,12 +49,23 @@ Rectangle { } } + onCursorVisibleChanged: { + if (textArea.cursorVisible) { + fl.interactive = true + } else { + fl.interactive = false + } + } + wrapMode: Text.Wrap MouseArea { anchors.fill: parent acceptedButtons: Qt.RightButton - onClicked: contextMenu.open() + onClicked: { + fl.interactive = true + contextMenu.open() + } } ContextMenuType {