Inconsistent term.onData Event Behavior Between iOS and Android in React Native WebView Terminal
raghulkrishna opened this issue · 1 comments
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
- clone the repo https://github.com/raghulkrishna/xtermtest
- cd xtermtest
- npm i
- npx expo run:android/ios
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.