Skip to content
Snippets Groups Projects
Verified Commit 8730586c authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Focus text field on key press (swallows first though...)

parent 593d08fd
No related branches found
No related tags found
No related merge requests found
Pipeline #4004 passed
......@@ -28,6 +28,8 @@ Item {
onRoomChanged: if (room != null) room.triggerSpecialEffects()
Keys.onPressed: if (!topBar.searchHasFocus) TimelineManager.focusMessageInput();
Shortcut {
sequence: StandardKey.Close
onActivated: Rooms.resetCurrentRoom()
......
......@@ -25,6 +25,8 @@ Pane {
property bool isDirect: room ? room.isDirect : false
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
property bool searchHasFocus: searchField.focus && searchField.enabled
property string searchString: ""
onRoomIdChanged: {
......@@ -447,6 +449,7 @@ Pane {
MatrixTextField {
id: searchField
visible: searchButton.searchActive
enabled: visible
Layout.row: 5
Layout.column: 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment