Browse Source

fix(prejoin): Auto focus display name input

master
Vlad Piersec 5 years ago
parent
commit
b670b29d7f
No account linked to committer's email address

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

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

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

279
                     <div className = 'prejoin-input-area-container'>
279
                     <div className = 'prejoin-input-area-container'>
280
                         <div className = 'prejoin-input-area'>
280
                         <div className = 'prejoin-input-area'>
281
                             <InputField
281
                             <InputField
282
+                                autoFocus = { true }
282
                                 onChange = { _setName }
283
                                 onChange = { _setName }
283
                                 onSubmit = { joinConference }
284
                                 onSubmit = { joinConference }
284
                                 placeHolder = { t('dialog.enterDisplayName') }
285
                                 placeHolder = { t('dialog.enterDisplayName') }

Loading…
Cancel
Save