1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Handle focusing multiple composers

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-07-08 17:33:49 +02:00
parent 14687f3630
commit 7734f8aeef
4 changed files with 33 additions and 3 deletions

View File

@@ -832,6 +832,22 @@ export default class RoomView extends React.Component<IProps, IState> {
break;
}
case Action.FocusAComposer: {
// re-dispatch to the correct composer
if (this.state.editState) {
dis.dispatch({
...payload,
action: Action.FocusEditMessageComposer,
});
} else {
dis.dispatch({
...payload,
action: Action.FocusComposer,
});
}
break;
}
case "scroll_to_bottom":
this.messagePanel?.jumpToLiveTimeline();
break;