Merge pull request #7475 from vp8x8/prejoin-focus
fix(prejoin): Auto focus display name input
This commit is contained in:
commit
2c2edace2a
|
@ -6,6 +6,11 @@ import { getFieldValue } from '../../../react';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the input should be focused on display.
|
||||||
|
*/
|
||||||
|
autoFocus?: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class name to be appended to the default class list.
|
* Class name to be appended to the default class list.
|
||||||
*/
|
*/
|
||||||
|
@ -109,6 +114,7 @@ export default class InputField extends PureComponent<Props, State> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
|
autoFocus = { this.props.autoFocus }
|
||||||
className = { `field ${this.state.focused ? 'focused' : ''} ${this.props.className || ''}` }
|
className = { `field ${this.state.focused ? 'focused' : ''} ${this.props.className || ''}` }
|
||||||
data-testid = { this.props.testId ? this.props.testId : undefined }
|
data-testid = { this.props.testId ? this.props.testId : undefined }
|
||||||
onBlur = { this._onBlur }
|
onBlur = { this._onBlur }
|
||||||
|
|
|
@ -315,6 +315,7 @@ class Prejoin extends Component<Props, State> {
|
||||||
<div className = 'prejoin-input-area-container'>
|
<div className = 'prejoin-input-area-container'>
|
||||||
<div className = 'prejoin-input-area'>
|
<div className = 'prejoin-input-area'>
|
||||||
<InputField
|
<InputField
|
||||||
|
autoFocus = { true }
|
||||||
onChange = { _setName }
|
onChange = { _setName }
|
||||||
onSubmit = { joinConference }
|
onSubmit = { joinConference }
|
||||||
placeHolder = { t('dialog.enterDisplayName') }
|
placeHolder = { t('dialog.enterDisplayName') }
|
||||||
|
|
Loading…
Reference in New Issue