Skip to content

Commit

Permalink
Merge pull request #23447 from chiragxarora/fix/23303
Browse files Browse the repository at this point in the history
Disabling spell check on multiple pages
  • Loading branch information
grgia authored Aug 2, 2023
2 parents 586060e + 74c82ea commit d228257
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ function AddressSearch(props) {
}
},
maxLength: props.maxInputLength,
spellCheck: false,
}}
styles={{
textInputContainer: [styles.flexColumn],
Expand Down
1 change: 1 addition & 0 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ class BaseOptionsSelector extends Component {
}}
selectTextOnFocus
blurOnSubmit={Boolean(this.state.allOptions.length)}
spellCheck={false}
/>
);
const optionsList = (
Expand Down
1 change: 1 addition & 0 deletions src/components/RoomNameInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function RoomNameInput({autoFocus, disabled, errorText, forwardedRef, value, onB
onBlur={onBlur}
autoFocus={autoFocus}
maxLength={CONST.REPORT.MAX_ROOM_NAME_LENGTH}
spellCheck={false}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ function BaseSelectionListRadio(props) {
onChangeText={props.onChangeText}
keyboardType={props.keyboardType}
selectTextOnFocus
spellCheck={false}
/>
</View>
)}
Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/Payments/AddDebitCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function DebitCardPage(props) {
accessibilityLabel={translate('addDebitCardPage.nameOnCard')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
ref={(ref) => (nameOnCardRef.current = ref)}
spellCheck={false}
/>
<TextInput
inputID="cardNumber"
Expand Down
2 changes: 2 additions & 0 deletions src/pages/settings/Profile/DisplayNamePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function DisplayNamePage(props) {
defaultValue={lodashGet(currentUserDetails, 'firstName', '')}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
autoCapitalize="words"
spellCheck={false}
/>
</View>
<View>
Expand All @@ -105,6 +106,7 @@ function DisplayNamePage(props) {
defaultValue={lodashGet(currentUserDetails, 'lastName', '')}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
autoCapitalize="words"
spellCheck={false}
/>
</View>
</Form>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/settings/Profile/PersonalDetails/AddressPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={street2 || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
<View style={styles.formSpaceVertical} />
<View style={styles.mhn5}>
Expand All @@ -192,6 +193,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={address.state || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
)}
<View style={styles.formSpaceVertical} />
Expand All @@ -202,6 +204,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={address.city || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
<View style={styles.formSpaceVertical} />
<TextInput
Expand Down
2 changes: 2 additions & 0 deletions src/pages/settings/Profile/PersonalDetails/LegalNamePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function LegalNamePage(props) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={legalFirstName}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
spellCheck={false}
/>
</View>
<View>
Expand All @@ -107,6 +108,7 @@ function LegalNamePage(props) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={legalLastName}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
spellCheck={false}
/>
</View>
</Form>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/tasks/NewTaskDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const defaultProps = {
task: {},
};

function NewTaskPage(props) {
function NewTaskDetailsPage(props) {
const inputRef = useRef();
const [taskTitle, setTaskTitle] = useState(props.task.title);
const [taskDescription, setTaskDescription] = useState(props.task.description || '');
Expand Down Expand Up @@ -121,9 +121,9 @@ function NewTaskPage(props) {
);
}

NewTaskPage.displayName = 'NewTaskPage';
NewTaskPage.propTypes = propTypes;
NewTaskPage.defaultProps = defaultProps;
NewTaskDetailsPage.displayName = 'NewTaskDetailsPage';
NewTaskDetailsPage.propTypes = propTypes;
NewTaskDetailsPage.defaultProps = defaultProps;

export default compose(
withOnyx({
Expand All @@ -135,4 +135,4 @@ export default compose(
},
}),
withLocalize,
)(NewTaskPage);
)(NewTaskDetailsPage);
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ function WorkspaceMembersPage(props) {
onChangeText={setSearchValue}
label={props.translate('optionsSelector.findMember')}
accessibilityLabel={props.translate('optionsSelector.findMember')}
spellCheck={false}
/>
</View>
{data.length > 0 ? (
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function WorkspaceSettingsPage(props) {
containerStyles={[styles.mt4]}
defaultValue={props.policy.name}
maxLength={CONST.WORKSPACE_NAME_CHARACTER_LIMIT}
spellCheck={false}
/>
<View style={[styles.mt4]}>
<Picker
Expand Down

0 comments on commit d228257

Please sign in to comment.