components: handle enter and return

This commit is contained in:
selsta
2019-12-10 02:48:03 +01:00
parent f03ea0461c
commit 38d412a3fa
4 changed files with 9 additions and 0 deletions

View File

@@ -110,6 +110,8 @@ Item {
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
root.close()
root.accepted()