Fix taking focus for chat
This commit is contained in:
parent
2e780d7c6a
commit
bd8bf6120e
|
@ -7,7 +7,7 @@ Page {
|
|||
id: innerPage
|
||||
|
||||
|
||||
default property alias columnChildren: contentColumn.children
|
||||
default property alias columnData: contentColumn.data
|
||||
|
||||
property alias flickable: innerFlickable
|
||||
property alias headerLabel: innerHeaderLabel
|
||||
|
|
|
@ -6,6 +6,7 @@ import "RoomSidePane"
|
|||
|
||||
Item {
|
||||
id: chat
|
||||
onFocusChanged: if (focus && loader.item) loader.item.composer.takeFocus()
|
||||
|
||||
|
||||
property string userId: ""
|
||||
|
@ -39,9 +40,11 @@ Item {
|
|||
|
||||
|
||||
HLoader {
|
||||
id: loader
|
||||
anchors.rightMargin: roomSidePane.visibleWidth
|
||||
anchors.fill: parent
|
||||
visible: ! roomSidePane.hidden || anchors.rightMargin < width
|
||||
onLoaded: if (chat.focus) item.composer.takeFocus()
|
||||
|
||||
source: ready ? "ChatPage.qml" : ""
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@ HPage {
|
|||
// The target will be our EventList, not the page itself
|
||||
becomeKeyboardFlickableTarget: false
|
||||
|
||||
Component.onCompleted: composer.takeFocus()
|
||||
|
||||
readonly property alias composer: composer
|
||||
|
||||
|
||||
RoomHeader {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
@ -63,7 +63,8 @@ Item {
|
|||
anchors.fill: parent
|
||||
anchors.leftMargin: sidePane.visibleSize
|
||||
visible: ! sidePane.hidden || anchors.leftMargin < width
|
||||
|
||||
clip: appearAnimation.running
|
||||
onLoaded: { takeFocus(); appearAnimation.start() }
|
||||
// onSourceChanged: if (sidePane.collapse) sidePane.close()
|
||||
|
||||
|
||||
|
@ -133,12 +134,6 @@ Item {
|
|||
}
|
||||
|
||||
|
||||
onStatusChanged: if (status === Loader.Ready) {
|
||||
pageLoader.takeFocus()
|
||||
appearAnimation.start()
|
||||
}
|
||||
|
||||
clip: appearAnimation.running
|
||||
XAnimator {
|
||||
id: appearAnimation
|
||||
target: pageLoader.item
|
||||
|
|
Loading…
Reference in New Issue
Block a user