Add a focus_composer dispatcher action

and use it
This commit is contained in:
Travis Ralston 2020-06-02 19:07:46 -06:00
parent b50046f1ab
commit 1f1f613777
11 changed files with 31 additions and 17 deletions

View file

@ -27,6 +27,7 @@ import SettingsStore from '../../settings/SettingsStore';
import {_t} from "../../languageHandler";
import Analytics from "../../Analytics";
import RoomList2 from "../views/rooms/RoomList2";
import {Action} from "../../dispatcher/actions";
const LeftPanel = createReactClass({
@ -198,7 +199,7 @@ const LeftPanel = createReactClass({
onSearchCleared: function(source) {
if (source === "keyboard") {
dis.dispatch({action: 'focus_composer'});
dis.fire(Action.FocusComposer);
}
this.setState({searchExpanded: false});
},