mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Focus text field on key press (swallows first though...)
This commit is contained in:
parent
593d08fd2e
commit
8730586cfd
2 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,8 @@ Item {
|
||||||
|
|
||||||
onRoomChanged: if (room != null) room.triggerSpecialEffects()
|
onRoomChanged: if (room != null) room.triggerSpecialEffects()
|
||||||
|
|
||||||
|
Keys.onPressed: if (!topBar.searchHasFocus) TimelineManager.focusMessageInput();
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Close
|
sequence: StandardKey.Close
|
||||||
onActivated: Rooms.resetCurrentRoom()
|
onActivated: Rooms.resetCurrentRoom()
|
||||||
|
|
|
@ -25,6 +25,8 @@ Pane {
|
||||||
property bool isDirect: room ? room.isDirect : false
|
property bool isDirect: room ? room.isDirect : false
|
||||||
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
|
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
|
||||||
|
|
||||||
|
property bool searchHasFocus: searchField.focus && searchField.enabled
|
||||||
|
|
||||||
property string searchString: ""
|
property string searchString: ""
|
||||||
|
|
||||||
onRoomIdChanged: {
|
onRoomIdChanged: {
|
||||||
|
@ -447,6 +449,7 @@ Pane {
|
||||||
MatrixTextField {
|
MatrixTextField {
|
||||||
id: searchField
|
id: searchField
|
||||||
visible: searchButton.searchActive
|
visible: searchButton.searchActive
|
||||||
|
enabled: visible
|
||||||
|
|
||||||
Layout.row: 5
|
Layout.row: 5
|
||||||
Layout.column: 2
|
Layout.column: 2
|
||||||
|
|
Loading…
Reference in a new issue