Do not handle numeric key pad events on the main search bar

This commit is contained in:
Christophe Deschamps 2024-11-19 18:31:58 +01:00
parent fbbcbe2012
commit 4a0ebd53ea
2 changed files with 4 additions and 3 deletions

View file

@ -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)}

View file

@ -156,7 +156,8 @@ Item {
focusedBorderColor: DefaultStyle.main1_500_main
numericPadButton.visible: text.length === 0
numericPadButton.checkable: false
handleNumericPadPopupButtonsPressed: false
onOpenNumericPadRequested:mainItem.goToNewCall()
Connections {