瀏覽代碼

Merge pull request #7475 from vp8x8/prejoin-focus

fix(prejoin): Auto focus display name input
j8
Hristo Terezov 5 年之前
父節點
當前提交
2c2edace2a
沒有連結到貢獻者的電子郵件帳戶。

+ 6
- 0
react/features/base/premeeting/components/web/InputField.js 查看文件

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 查看文件

315
                     <div className = 'prejoin-input-area-container'>
315
                     <div className = 'prejoin-input-area-container'>
316
                         <div className = 'prejoin-input-area'>
316
                         <div className = 'prejoin-input-area'>
317
                             <InputField
317
                             <InputField
318
+                                autoFocus = { true }
318
                                 onChange = { _setName }
319
                                 onChange = { _setName }
319
                                 onSubmit = { joinConference }
320
                                 onSubmit = { joinConference }
320
                                 placeHolder = { t('dialog.enterDisplayName') }
321
                                 placeHolder = { t('dialog.enterDisplayName') }

Loading…
取消
儲存