Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extra height, focus, suggestions in text input #505

Merged
merged 1 commit into from
Dec 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/AccountSeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ export default class AccountSeed extends Component {
return (
<View>
<TextInput
autoFocus
style={[fontStyles.t_seed, styles.input, invalidStyles]}
multiline
autoCorrect={false}
autoCompleteType="off"
autoCapitalize="none"
returnKeyType="done"
blurOnSubmit={true}
textAlignVertical="top"
onSelectionChange={this.handleCursorPosition}
{...this.props}
Expand Down
3 changes: 2 additions & 1 deletion src/components/ButtonNewDerivation.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const styles = StyleSheet.create({
},
text: {
letterSpacing: -0.4,
opacity: 0.4
opacity: 0.4,
textAlign: 'center'
}
});
7 changes: 5 additions & 2 deletions src/screens/IdentityNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use strict';

import React, { useEffect, useState } from 'react';
import { StyleSheet, View } from 'react-native';
import { Platform, StyleSheet, View } from 'react-native';
import { withNavigation } from 'react-navigation';

import Button from '../components/Button';
Expand Down Expand Up @@ -145,7 +145,10 @@ function IdentityNew({ accounts, navigation }) {
);

return (
<KeyboardScrollView style={styles.body}>
<KeyboardScrollView
style={styles.body}
extraHeight={Platform.OS === 'ios' ? 210 : 120}
>
<ScreenHeading title={'New Identity'} />
<TextInput
onChangeText={updateName}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/IdentityPin.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function IdentityPin({ navigation, accounts }) {
return (
<KeyboardScrollView
style={styles.body}
extraHeight={120}
extraHeight={200}
testID={testIDs.IdentityPin.scrollScreen}
>
<Background />
Expand Down
9 changes: 6 additions & 3 deletions src/screens/PathDerivation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React, { useState } from 'react';
import { withNavigation } from 'react-navigation';
import { withAccountStore } from '../util/HOC';
import { StyleSheet, Text, View } from 'react-native';
import { Platform, StyleSheet, Text, View } from 'react-native';
import TextInput from '../components/TextInput';
import ButtonMainAction from '../components/ButtonMainAction';
import { validateDerivedPath } from '../util/identitiesUtils';
Expand Down Expand Up @@ -74,17 +74,20 @@ function PathDerivation({ accounts, navigation }) {
subtitle={existedNetworkPath}
subtitleIcon={true}
/>
<KeyboardScrollView>
<KeyboardScrollView extraHeight={Platform.OS === 'ios' ? 250 : 180}>
{!isPathValid && <Text>Invalid Path</Text>}
<TextInput
autoCorrect={false}
autoCompleteType="off"
label="Path"
placeholder="//hard/soft"
autoFocus
value={derivationPath}
testID={testIDs.PathDerivation.pathInput}
onChangeText={setDerivationPath}
/>
<TextInput
autoCorrect={false}
autoCompleteType="off"
label="Display Name"
testID={testIDs.PathDerivation.nameInput}
value={keyPairsName}
Expand Down