diff --git a/frontend/my/src/Campaign.js b/frontend/my/src/Campaign.js
index 90c3022..ef990e3 100644
--- a/frontend/my/src/Campaign.js
+++ b/frontend/my/src/Campaign.js
@@ -128,9 +128,12 @@ class Editor extends React.PureComponent {
modules={ this.quillModules }
defaultValue={ this.props.record.body }
ref={ (o) => {
- if(o) {
- this.setState({ quill: o })
+ if(!o) {
+ return
}
+
+ this.setState({ quill: o })
+ document.querySelector(".ql-editor").focus()
}}
onChange={ () => {
if(!this.state.quill) {
@@ -218,10 +221,7 @@ class TheFormDef extends React.PureComponent {
message: "Campaign created",
description: `"${values["name"]}" created` })
- this.props.route.history.push(cs.Routes.ViewCampaign.replace(":id", resp.data.data.id))
- this.props.fetchRecord(resp.data.data.id)
- this.props.setCurrentTab("content")
- this.setState({ loading: false })
+ this.props.route.history.push(cs.Routes.ViewCampaign.replace(":id", resp.data.data.id) + "#content")
}).catch(e => {
notification["error"]({ placement: cs.MsgPosition, message: "Error", description: e.message })
this.setState({ loading: false })
@@ -428,6 +428,11 @@ class Campaign extends React.PureComponent {
} else {
this.setState({ loading: false })
}
+
+ // Content tab?
+ if(document.location.hash === "#content") {
+ this.setCurrentTab("content")
+ }
}
fetchRecord = (id) => {
@@ -498,22 +503,29 @@ class Campaign extends React.PureComponent {