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

keyboardType makes the input laggy on Android #48684

Closed
Elabar opened this issue Jan 15, 2025 · 6 comments
Closed

keyboardType makes the input laggy on Android #48684

Elabar opened this issue Jan 15, 2025 · 6 comments
Labels
API: Keyboard Needs: Triage 🔍 Newer Patch Available Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@Elabar
Copy link

Elabar commented Jan 15, 2025

Description

When new architecture is enabled, specifying a keyboardType="numeric" is laggy on android. You can see a slight delay on every keystoke.

Try lowering the expo to v51, so the new architecture is disabled, input is smooth again.

Minimal snack repro: https://snack.expo.dev/@elabar/dffd6f

Steps to reproduce

  1. Open the snack
  2. Try to type normally in the red colored input

React Native Version

0.76.5

Affected Platforms

Runtime - Android

Areas

Other (please specify)

Output of npx react-native info

System:
  OS: macOS 15.2
  CPU: (8) arm64 Apple M1
  Memory: 103.20 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.15.0
    path: ~/.nvm/versions/node/v18.15.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nvm/versions/node/v18.15.0/bin/yarn
  npm:
    version: 9.5.0
    path: ~/.nvm/versions/node/v18.15.0/bin/npm
  Watchman:
    version: 2024.11.25.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.18
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/@elabar/dffd6f

Screenshots and Videos

No response

@Elabar Elabar added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jan 15, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cortinico
Copy link
Contributor

You can see a slight delay on every keystoke.

Do you have a video?

@shubhamguptadream11
Copy link
Collaborator

@Elabar Also can you check if this delay is also observed in bare RN Project?

@Elabar
Copy link
Author

Elabar commented Jan 15, 2025

Do you have a video?

Screen.Recording.2025-01-15.at.6.54.20.PM.mov

Here you can see that I'm pressing "1", "2" consecutively, but only one character is registered.

@Elabar Also can you check if this delay is also observed in bare RN Project?

Interestingly, I don't see this lag in bare RN project. I tried with 0.76.5, and 0.76.6. Both work just fine in bare RN project.

Guess I should report this in expo instead..?

@Elabar
Copy link
Author

Elabar commented Jan 16, 2025

For anyone who are here. You can try inputMode="numeric" to mitigate the issue.

@Elabar Elabar closed this as completed Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Keyboard Needs: Triage 🔍 Newer Patch Available Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

4 participants