From 4a0ebd53eaf5eebcab25a138a58a35fb739fec18 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Tue, 19 Nov 2024 18:31:58 +0100 Subject: [PATCH] Do not handle numeric key pad events on the main search bar --- Linphone/view/Control/Input/SearchBar.qml | 4 ++-- Linphone/view/Page/Layout/Main/MainLayout.qml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Linphone/view/Control/Input/SearchBar.qml b/Linphone/view/Control/Input/SearchBar.qml index 7817adcf7..cde6a2dc5 100644 --- a/Linphone/view/Control/Input/SearchBar.qml +++ b/Linphone/view/Control/Input/SearchBar.qml @@ -19,6 +19,7 @@ FocusScope { readonly property bool hasActiveFocus: textField.activeFocus property alias color: backgroundItem.color property bool delaySearch: true // Wait some idle time after typing to start searching + property bool handleNumericPadPopupButtonsPressed: true signal openNumericPadRequested()// Useful for redirection before displaying numeric pad. @@ -27,10 +28,9 @@ FocusScope { } Connections { - enabled: numericPadPopup != undefined + enabled: numericPadPopup != undefined && handleNumericPadPopupButtonsPressed target: numericPadPopup ? numericPadPopup : null function onButtonPressed(text) { - console.log("text", text) textField.text += text } function onWipe(){ textField.text = textField.text.slice(0, -1)} diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index b57128f72..a3ed8f463 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -156,7 +156,8 @@ Item { focusedBorderColor: DefaultStyle.main1_500_main numericPadButton.visible: text.length === 0 numericPadButton.checkable: false - + handleNumericPadPopupButtonsPressed: false + onOpenNumericPadRequested:mainItem.goToNewCall() Connections {