From 5502a639e2f392e02b18794c2d3ae7b86d59185a Mon Sep 17 00:00:00 2001 From: beholder Date: Tue, 26 Sep 2017 01:07:47 +0300 Subject: [PATCH] 7877 Unexpected Behavior when pressing Enter on Input Field --- interface/resources/qml/controls-uit/Keyboard.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/resources/qml/controls-uit/Keyboard.qml b/interface/resources/qml/controls-uit/Keyboard.qml index 4739534fcd..ab361491bd 100644 --- a/interface/resources/qml/controls-uit/Keyboard.qml +++ b/interface/resources/qml/controls-uit/Keyboard.qml @@ -116,6 +116,13 @@ Item { wrapMode: Text.WordWrap readOnly: false // we need to leave this property read-only to allow control to accept QKeyEvent selectByMouse: false + + Keys.onPressed: { + if (event.key == Qt.Key_Return) { + mirrorText.text = ""; + event.accepted = true; + } + } } MouseArea { // ... and we need this mouse area to prevent mirrorText from getting mouse events to ensure it will never get focus