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

Inconsistent term.onData Event Behavior Between iOS and Android in React Native WebView Terminal #5108

Open
raghulkrishna opened this issue Jul 21, 2024 · 1 comment
Labels
help wanted type/enhancement Features or improvements to existing features

Comments

@raghulkrishna
Copy link

raghulkrishna commented Jul 21, 2024

Inconsistent term.onData Event Behavior Between iOS and Android in React Native WebView Terminal

Expected Behavior:
The term.onData event should trigger immediately on every key press in both iOS and Android platforms.

Actual Behavior:

iOS: The term.onData event fires immediately on every key press, as expected.
Android: The term.onData event only fires when the Enter key is pressed twice.

Additional Information:

I've tried different configurations and approaches, but the issue persists only on Android.
It seems like the data from the keyboard input is being buffered and only sent after pressing Enter twice.

Could anyone provide insights or solutions to ensure consistent behavior of the term.onData event on both iOS and Android platforms?

Details

  • Browser and browser version:
  • OS version
    Mozilla/5.0 (Linux; Android 14; sdk_gphone64_x86_64 Build/UE1A.230829.036.A1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.136 Mobile Safari/537.36
  • xterm.js version: 5.5.0

Steps to reproduce

  1. clone the repo https://github.com/raghulkrishna/xtermtest
  2. cd xtermtest
  3. npm i
  4. npx expo run:android/ios
@jerch
Copy link
Member

jerch commented Jul 21, 2024

This is most likely caused by a software keyboard intercepting keypresses until it sees a "commit char". We have several issues regarding android key input with different keyboard apps, none brought up any good solution yet.

@Tyriar Tyriar added type/enhancement Features or improvements to existing features help wanted labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/enhancement Features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

3 participants