mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Focus composer after reacting
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
b916b789aa
commit
64f32a9fc1
@ -22,6 +22,7 @@ import EmojiPicker from "./EmojiPicker";
|
||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
import dis from "../../../dispatcher/dispatcher";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { Action } from '../../../dispatcher/actions';
|
||||
|
||||
interface IProps {
|
||||
mxEvent: MatrixEvent;
|
||||
@ -93,6 +94,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
||||
this.props.mxEvent.getRoomId(),
|
||||
myReactions[reaction],
|
||||
);
|
||||
dis.dispatch({ action: Action.FocusComposer });
|
||||
// Tell the emoji picker not to bump this in the more frequently used list.
|
||||
return false;
|
||||
} else {
|
||||
@ -104,6 +106,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
||||
},
|
||||
});
|
||||
dis.dispatch({ action: "message_sent" });
|
||||
dis.dispatch({ action: Action.FocusComposer });
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user