소스 검색

fix(prejoin): Auto focus display name input

master
Vlad Piersec 5 년 전
부모
커밋
b670b29d7f
No account linked to committer's email address
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 6
    0
      react/features/base/premeeting/components/web/InputField.js
  2. 1
    0
      react/features/prejoin/components/Prejoin.js

+ 6
- 0
react/features/base/premeeting/components/web/InputField.js 파일 보기

@@ -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 파일 보기

@@ -279,6 +279,7 @@ class Prejoin extends Component<Props, State> {
279 279
                     <div className = 'prejoin-input-area-container'>
280 280
                         <div className = 'prejoin-input-area'>
281 281
                             <InputField
282
+                                autoFocus = { true }
282 283
                                 onChange = { _setName }
283 284
                                 onSubmit = { joinConference }
284 285
                                 placeHolder = { t('dialog.enterDisplayName') }

Loading…
취소
저장