Skip to content

Commit 60f43e9

Browse files
committed
fix(bridge): Cannot trigger the keyboard for amount to send after closing the keyboard
The MouseArea will eat the tap events from the TextField. Manually trigger the keyboard on click
1 parent b2e79c4 commit 60f43e9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ui/imports/shared/popups/send/views/AmountToSend.qml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import QtQml
12
import QtQuick
23
import QtQuick.Controls
34
import QtQuick.Layouts
@@ -137,6 +138,15 @@ Control {
137138
textField.forceActiveFocus()
138139
}
139140

141+
TapHandler {
142+
enabled: root.interactive
143+
onTapped: {
144+
textField.forceActiveFocus()
145+
if (SQUtils.Utils.isMobile && !Qt.inputMethod.visible)
146+
Qt.inputMethod.show()
147+
}
148+
}
149+
140150
QtObject {
141151
id: d
142152

@@ -256,8 +266,8 @@ Control {
256266
anchors.fill: parent
257267
enabled: textField.focus
258268
cursorShape: Qt.IBeamCursor
259-
onClicked: {
260-
textField.cursorPosition = textField.positionAt(mouseX,mouseY)
269+
onClicked: (mouse) => {
270+
textField.cursorPosition = textField.positionAt(mouse.x,mouse.y)
261271
textField.forceActiveFocus()
262272
}
263273
onWheel: {

0 commit comments

Comments
 (0)