Skip to content

Commit

Permalink
Merge pull request #15184 from daraksha-dk/daraksha-dk-fix-new-room-k…
Browse files Browse the repository at this point in the history
…eyboard
  • Loading branch information
francoisl authored Feb 16, 2023
2 parents 2445604 + 02460af commit 356543f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/RoomNameInput/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class RoomNameInput extends Component {
onBlur={this.props.onBlur}
autoFocus={this.props.autoFocus}
autoCapitalize="none"
shouldDelayFocus={this.props.shouldDelayFocus}
/>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/RoomNameInput/roomNameInputPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const propTypes = {

/** AutoFocus */
autoFocus: PropTypes.bool,

/** Whether we should wait before focusing the TextInput, useful when using transitions on Android */
shouldDelayFocus: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -39,6 +42,7 @@ const defaultProps = {
inputID: undefined,
onBlur: () => {},
autoFocus: false,
shouldDelayFocus: false,
};

export {propTypes, defaultProps};
2 changes: 2 additions & 0 deletions src/pages/workspace/WorkspaceNewRoomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Permissions from '../../libs/Permissions';
import Log from '../../libs/Log';
import * as ValidationUtils from '../../libs/ValidationUtils';
import Form from '../../components/Form';
import shouldDelayFocus from '../../libs/shouldDelayFocus';

const propTypes = {
/** All reports shared with the user */
Expand Down Expand Up @@ -141,6 +142,7 @@ class WorkspaceNewRoomPage extends React.Component {
<RoomNameInput
inputID="roomName"
autoFocus
shouldDelayFocus={shouldDelayFocus}
/>
</View>
<View style={styles.mb5}>
Expand Down

0 comments on commit 356543f

Please sign in to comment.