diff --git a/webroot/js/components/chat/username.js b/webroot/js/components/chat/username.js index fb4be113e..c95e3ea56 100644 --- a/webroot/js/components/chat/username.js +++ b/webroot/js/components/chat/username.js @@ -79,6 +79,12 @@ export default class UsernameForm extends Component { } } + componentDidUpdate({ }, { displayForm }) { + if (this.state.displayForm && !displayForm ) { + document.getElementById('username-change-input').select(); + } + } + render(props, state) { const { username, isModerator } = props; const { displayForm } = state;