Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Auto-select username input field when changing name. (#1754)

le-fractal40d44f8b9082
diff --git a/webroot/js/components/chat/username.js b/webroot/js/components/chat/username.js
index fb4be113ed..c95e3ea567 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;