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
+2 -1
View File
@@ -31,6 +31,7 @@ import Spinner from "./components/views/elements/Spinner";
// Polyfill for Canvas.toBlob API using Canvas.toDataURL
import "blueimp-canvas-to-blob";
import { Action } from "./dispatcher/actions";
const MAX_WIDTH = 800;
const MAX_HEIGHT = 600;
@@ -529,7 +530,7 @@ export default class ContentMessages {
dis.dispatch({action: 'upload_started'});
// Focus the composer view
dis.dispatch({action: 'focus_composer'});
dis.fire(Action.FocusComposer);
function onProgress(ev) {
upload.total = ev.total;