Skip to content

Commit c402623

Browse files
wyu71deepin-bot[bot]
authored andcommitted
fix: block right-click context menu in NetPasswordEdit
- Added MouseArea to intercept right-click events and prevent default context menu. Log: block right-click context menu in NetPasswordEdit pms: BUG-286615
1 parent 1dc62dd commit c402623

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

dcc-network/qml/NetPasswordEdit.qml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ D.PasswordEdit {
1515
placeholderText: qsTr("Required")
1616
echoButtonVisible: newInput
1717
showAlert: dataItem.errorKey === dccObj.name
18+
MouseArea {
19+
anchors.fill: parent
20+
acceptedButtons: Qt.RightButton
21+
onClicked: {
22+
if (mouse.button === Qt.RightButton) {
23+
mouse.accepted = true
24+
}
25+
}
26+
}
1827
onTextChanged: {
1928
if (!initialized) {
2029
return

0 commit comments

Comments
 (0)