qml: tap-on-background now removes focus, allowing convenient way to hide keyboard
This commit is contained in:
@@ -298,16 +298,6 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
|
||||
// make clicking the dialog background move the scope away from textedit fields
|
||||
// so the keyboard goes away
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: -1000
|
||||
onClicked: parkFocus.focus = true
|
||||
FocusScope { id: parkFocus }
|
||||
}
|
||||
|
||||
|
||||
RequestDetails {
|
||||
id: request
|
||||
wallet: Daemon.currentWallet
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.0
|
||||
|
||||
Dialog {
|
||||
id: abstractdialog
|
||||
@@ -94,4 +95,11 @@ Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: bg
|
||||
color: Material.dialogColor
|
||||
TapHandler {
|
||||
onTapped: bg.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.0
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
@@ -201,14 +201,4 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
|
||||
// make clicking the dialog background move the scope away from textedit fields
|
||||
// so the keyboard goes away
|
||||
// TODO: here it works on desktop, but not android. hmm.
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: -1000
|
||||
onClicked: { parkFocus.focus = true }
|
||||
FocusScope { id: parkFocus }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.0
|
||||
|
||||
@@ -18,6 +18,9 @@ Pane {
|
||||
|
||||
background: Rectangle {
|
||||
color: Material.dialogColor
|
||||
TapHandler {
|
||||
onTapped: root.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
onAccept: {
|
||||
|
||||
Reference in New Issue
Block a user