Browse Source

Merge pull request #7475 from vp8x8/prejoin-focus

fix(prejoin): Auto focus display name input
j8
Hristo Terezov 4 years ago
parent
commit
2c2edace2a
No account linked to committer's email address

+ 6
- 0
react/features/base/premeeting/components/web/InputField.js View File

@@ -6,6 +6,11 @@ import { getFieldValue } from '../../../react';
6 6
 
7 7
 type Props = {
8 8
 
9
+    /**
10
+     * If the input should be focused on display.
11
+     */
12
+    autoFocus?: boolean,
13
+
9 14
     /**
10 15
      * Class name to be appended to the default class list.
11 16
      */
@@ -109,6 +114,7 @@ export default class InputField extends PureComponent<Props, State> {
109 114
     render() {
110 115
         return (
111 116
             <input
117
+                autoFocus = { this.props.autoFocus }
112 118
                 className = { `field ${this.state.focused ? 'focused' : ''} ${this.props.className || ''}` }
113 119
                 data-testid = { this.props.testId ? this.props.testId : undefined }
114 120
                 onBlur = { this._onBlur }

+ 1
- 0
react/features/prejoin/components/Prejoin.js View File

@@ -315,6 +315,7 @@ class Prejoin extends Component<Props, State> {
315 315
                     <div className = 'prejoin-input-area-container'>
316 316
                         <div className = 'prejoin-input-area'>
317 317
                             <InputField
318
+                                autoFocus = { true }
318 319
                                 onChange = { _setName }
319 320
                                 onSubmit = { joinConference }
320 321
                                 placeHolder = { t('dialog.enterDisplayName') }

Loading…
Cancel
Save