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

Erratic text output from typing into xterm console on Chrome on Android devices #3600

Open
Bardia95 opened this issue Jan 8, 2022 · 8 comments
Labels
help wanted type/bug Something is misbehaving

Comments

@Bardia95
Copy link

Bardia95 commented Jan 8, 2022

We are using xterm at replit to provide users with a console, and our app runs on mobile as well. A significant number of our Android users are reporting that they are having issues with typing into their console, specifically, they are seeing their characters get jumbled up, duplicate characters, and weird text.

I found this from CodeMirror which would explain it:

Chrome Android, especially in combination with GBoard, not only doesn't reliably fire regular key events, but also often surrounds the effect of enter or backspace with a bunch of composition events that, when interrupted, cause text duplication or other kinds of corruption.

They've documented the workaround they use for their code editor here, which you can use as reference for fixing this bug around the Android Chrome limitation.

We would be very appreciative if you could prioritize this fix given the significant number of people affected by it.

Details

  • Browser and browser version: Chrome (latest)
  • OS version: Android (Galaxy S9)
  • xterm.js version: 4.14.1

Steps to reproduce

  1. Type a number into the console.
  2. See duplicated text output of the number.
@Tyriar
Copy link
Member

Tyriar commented Jan 10, 2022

We would be very appreciative if you could prioritize this fix given the significant number of people affected by it.

You're welcome to contribute improvements as this is very low on my priority list.

@Tyriar Tyriar added help wanted type/bug Something is misbehaving labels Jan 10, 2022
@luxi78
Copy link

luxi78 commented Jan 17, 2022

+1
This problem also bothered me and other people using android devices

@mwllgr
Copy link

mwllgr commented Mar 9, 2022

Same here, even with Firefox on Android. Coming from MeshCentral.

@HALOCORE
Copy link

HALOCORE commented May 1, 2022

Same here, the default keyboard on Android is not usable so I am trying to combining customized virtual keyboard with this. However, virtual keyboard (such as KioskBoard) expose event handlers in JavaScript and there need to be a way to inject those key events to xterm.js.

I think if there is an API like the SendKey mentioned here, a lot of problems can be solved externally.
#3578

@HALOCORE
Copy link

HALOCORE commented May 4, 2022

Actually by adding JavaScript code that creates virtual keyboard to the webpage or put the original webpage containing xterm.js in an iframe, it is working on android chrome. No need to focus the element when typing on the virtual keyboard and the android keyboard will not pop up. Events created by the virtual keyboard are sent to document.getElementById("terminal").querySelector(".xterm-screen").querySelector(".xterm-helpers").querySelector(".xterm-helper-textarea"). Anyway, it would be more convenient if xterm.js has such keyboard builtin.
demopic

@ink404
Copy link
Contributor

ink404 commented Aug 11, 2022

related PR: #4007

@sravyak
Copy link

sravyak commented Jan 5, 2023

DId you get any solution to it.

@EPXOL
Copy link

EPXOL commented Mar 17, 2023

still a problem and its present at cockpit project as well and it is super annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

8 participants