Auto-select username input field when changing name. (#1754)
Co-authored-by: Le Fractal <17422-fractal@users.noreply.framagit.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user