Skip to content

UI problem with iOS floating keyboard in iPad. #44068

@gkasireddy202

Description

@gkasireddy202

Description

Issue with TextInput return type "Done" on iPad using Floating keyboard

Steps to reproduce

  1. Focus on Textinput.
  2. Click on the Done button.
  3. The login button has disappeared.

React Native Version

0.73.2

Affected Platforms

Runtime - iOS

Output of npx react-native info

OS: macOS 14.2.1
  CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Memory: 507.06 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 19.8.1
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 6.14.18
    path: ~/Documents/Projects//Mobile/Myapp/node_modules/.bin/npm
  Watchman:
    version: 2023.03.13.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/gopi/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "23"
      - "24"
      - "25"
      - "26"
      - "27"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 32.1.0
      - 33.0.0
    System Images:
      - android-29 | Google APIs Intel x86 Atom
      - android-29 | Google Play Intel x86 Atom
      - android-30 | Google APIs Intel x86 Atom
      - android-32 | Google APIs Intel x86 Atom_64
      - android-32 | Google Play Intel x86 Atom_64
      - android-33 | Google APIs Intel x86 Atom_64
      - android-33 | Google Play Intel x86 Atom_64
    Android NDK: Not Found
IDEs:
  Android Studio: 2021.2 AI-212.5712.43.2112.8609683
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.15
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/gopi/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.2
    wanted: 0.73.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

import React, { Component } from 'react';
import { View, TextInput, Button, KeyboardAvoidingView, StyleSheet } from 'react-native';

class Loginpage extends Component {
  state = {
    username: '',
    password: '',
  };

  handleUsernameChange = (username) => {
    this.setState({ username });
  };

  handlePasswordChange = (password) => {
    this.setState({ password });
  };

  handleLogin = () => {
    const { username, password } = this.state;
    // Add your login logic here
    console.log('Username:', username);
    console.log('Password:', password);
  };

  render() {
    return (
      <KeyboardAvoidingView style={styles.container} behavior="padding">
        <View style={styles.inputContainer}>
          <TextInput
            style={styles.input}
            placeholder="Username"
            onChangeText={this.handleUsernameChange}
            value={this.state.username}
            autoCapitalize="none"
          />
          <TextInput
            style={styles.input}
            placeholder="Email"
            onChangeText={this.handleUsernameChange}
            value={this.state.username}
            autoCapitalize="none"
          />
          <TextInput
            style={styles.input}
            placeholder="Phone"
            onChangeText={this.handleUsernameChange}
            value={this.state.username}
            autoCapitalize="none"
          />
           <TextInput
            style={styles.input}
            placeholder="Password"
            onChangeText={this.handlePasswordChange}
            value={this.state.password}
            returnKeyType='done'
            secureTextEntry
          />
          <Button title="Login" onPress={this.handleLogin} />
        </View>
      </KeyboardAvoidingView>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#fff',
  },
  inputContainer: {
    width: '80%',
  },
  input: {
    height: 40,
    borderColor: 'gray',
    borderWidth: 1,
    marginBottom: 20,
    paddingLeft: 10,
  },
});

export default Loginpage;

Reproducer

No Git url

Screenshots and Videos

RPReplay_Final1712984638.MP4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions