Handle focusing multiple composers
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
||||
this.props.mxEvent.getRoomId(),
|
||||
myReactions[reaction],
|
||||
);
|
||||
dis.dispatch({ action: Action.FocusComposer });
|
||||
dis.dispatch({ action: Action.FocusAComposer });
|
||||
// Tell the emoji picker not to bump this in the more frequently used list.
|
||||
return false;
|
||||
} else {
|
||||
@@ -106,7 +106,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
||||
},
|
||||
});
|
||||
dis.dispatch({ action: "message_sent" });
|
||||
dis.dispatch({ action: Action.FocusComposer });
|
||||
dis.dispatch({ action: Action.FocusAComposer });
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -452,6 +452,8 @@ export default class EditMessageComposer extends React.Component<IProps, IState>
|
||||
} else if (payload.text) {
|
||||
this.editorRef.current?.insertPlaintext(payload.text);
|
||||
}
|
||||
} else if (payload.action === Action.FocusEditMessageComposer && this.editorRef.current) {
|
||||
this.editorRef.current.focus();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user