fix(desktop/chat): [base_bc] selecting a channel does not auto-focus on the text input field
When new channel/chat is displayed, text input field focus is forced properly. Fixes #4524
This commit is contained in:
parent
16225a3af9
commit
d8a7a3d812
|
@ -38,6 +38,14 @@ ColumnLayout {
|
||||||
|
|
||||||
property bool stickersLoaded: false
|
property bool stickersLoaded: false
|
||||||
|
|
||||||
|
// NOTE: Used this property change as it is the current way used for displaying new channel/chat data of content view.
|
||||||
|
// If in the future content is loaded dynamically, input focus should be activated when loaded / created content view.
|
||||||
|
onHeightChanged: {
|
||||||
|
if(chatContentRoot.height > 0) {
|
||||||
|
chatInput.forceInputActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StatusChatToolBar {
|
StatusChatToolBar {
|
||||||
id: topBar
|
id: topBar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -563,6 +563,10 @@ Rectangle {
|
||||||
messageInputField.forceActiveFocus();
|
messageInputField.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function forceInputActiveFocus() {
|
||||||
|
messageInputField.forceActiveFocus();
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Global.applicationWindow.dragAndDrop
|
target: Global.applicationWindow.dragAndDrop
|
||||||
onDroppedOnValidScreen: (drop) => {
|
onDroppedOnValidScreen: (drop) => {
|
||||||
|
|
Loading…
Reference in New Issue