summaryrefslogtreecommitdiffstats
path: root/web/react/components/edit_channel_purpose_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/edit_channel_purpose_modal.jsx')
-rw-r--r--web/react/components/edit_channel_purpose_modal.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/react/components/edit_channel_purpose_modal.jsx b/web/react/components/edit_channel_purpose_modal.jsx
index 4d162cfe7..4cb96a3ff 100644
--- a/web/react/components/edit_channel_purpose_modal.jsx
+++ b/web/react/components/edit_channel_purpose_modal.jsx
@@ -15,6 +15,12 @@ export default class EditChannelPurposeModal extends React.Component {
this.state = {serverError: ''};
}
+ componentDidUpdate() {
+ if (this.props.show) {
+ $(ReactDOM.findDOMNode(this.refs.purpose)).focus();
+ }
+ }
+
handleHide() {
this.setState({serverError: ''});
@@ -77,6 +83,7 @@ export default class EditChannelPurposeModal extends React.Component {
return (
<Modal
className='modal-edit-channel-purpose'
+ ref='modal'
show={this.props.show}
onHide={this.handleHide}
>