From 4bbd3a17952eb3ecb001f900692a12dd88d4702d Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Tue, 11 Jun 2024 14:11:20 -0300 Subject: [PATCH] clearing focus of text editor --- app/qml/form/editors/MMFormTextEditor.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/qml/form/editors/MMFormTextEditor.qml b/app/qml/form/editors/MMFormTextEditor.qml index 10ec5358e8..096d05943f 100644 --- a/app/qml/form/editors/MMFormTextEditor.qml +++ b/app/qml/form/editors/MMFormTextEditor.qml @@ -81,6 +81,18 @@ MMPrivateComponents.MMBaseSingleLineInput { } } + Connections { + target: textField + onActiveFocusChanged: { + if (textField.activeFocus) { + console.log("TextField has focus: " + root._fieldTitle) + } else { + textField.focus = false + console.log("TextField lost focus: " + root._fieldTitle) + } + } + } + QtObject { id: internal