Skip to content

[TextInput][iPad] Numeric keyboard type not working #17793

Description

@puradox

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 9.3.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.2 => 0.52.2

Target Platform: iOS (8.0)

Steps to Reproduce

  1. react-native init NumbersPlease
  2. Open XCode project and change "General -> Devices" from "iPhone" to "iPad"
  3. Modify App.js to render a TextInput with keyboardType='numeric':
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */importReact,{Component}from'react';import{Platform,StyleSheet,Text,View,TextInput}from'react-native';constinstructions=Platform.select({ios: 'Press Cmd+R to reload,\n'+'Cmd+D or shake for dev menu',android: 'Double tap R on your keyboard to reload,\n'+'Shake or press menu button for dev menu',});exportdefaultclassAppextendsComponent<{}>{render(){return(<Viewstyle={styles.container}><Textstyle={styles.welcome}>
Welcome to React Native!
</Text><Textstyle={styles.instructions}>
To get started, edit App.js
</Text><Textstyle={styles.instructions}>{instructions}</Text><TextInputkey='hi'autoFocus={true}keyboardType='numeric'/></View>);}}conststyles=StyleSheet.create({container: {flex: 1,justifyContent: 'center',alignItems: 'center',backgroundColor: '#F5FCFF',},welcome: {fontSize: 20,textAlign: 'center',margin: 10,},instructions: {textAlign: 'center',color: '#333333',marginBottom: 5,},});
  1. react-native run-ios --simulator "iPad Pro (12.9-inch) (2nd generation)"

Expected Behavior

A keyboard input automatically gaining focus with a numeric keyboard layout.

Actual Behavior

A keyboard input automatically gaining focus with a default keyboard layout.

simulator screen shot - ipad pro 12 9-inch 2nd generation - 2018-01-30 at 11 30 26

Reproducible Demo

puradox/NumbersPlease

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions