You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using xterm 4.4 with Xamarin.Android and Xamarin.iOS. Confirmed that this still repros in version 4.5.
When there's more than 1 line of user input, the cursor is stuck at the 0 x position of the current line and the previous text cannot be removed, but the text-area element which takes in the actual input does respect the user keystrokes.
"What is this why is this happening" is typed in the user input, both the text area element and the displayed content(div class ="xterm-accessibility-tree") respect the input change. "What is this why is t" is the first line, and the text after that, "his happening" is on the second line.
When removing text by backspace key, the text on the line which the cursor is on is removed, but the cursor gets stuck in the 0 x position of the current line and does not move to previous line. Pressing the backspace key repeatedly does not remove the text that's displayed in the previous line, but the text-area which is the actual input does respect the backspace key and has the correct input. This is the screenshot after I removed some text and is only left with "what ".
You can see that the text area element has "what ", but the displayed content's last div still has "what is this why is t".
Expected behavior:
What is being displayed should behave the same way as the text area does. While the user is typing something in the input, the displayed content should respect the changes the user makes.
The text was updated successfully, but these errors were encountered:
We cannot reliably sync the textarea with the prompt as xterm.js at its core is a component that just prints things and moves a cursor around, it doesn't have a concept of an input area. When you press backspace, it gets sent over to your server/shell, the shell responds by telling the terminal to move the cursor to the left one space and deleting the character. Expanding on this, when your shell prints its prompt, it looks exactly the same as any other text, just write blahblah@Azure:~$ as it would when responding to key events too.
This is a similar problem to pressing up/down doesn't reflect things in the textarea as discussed in microsoft/vscode#94708 (comment)
Now as for the problem where your cursor doesn't wrap back beyond x 0, this is the responsibility of a readline component on the server/shell side that when xterm.js tells it that backspace is hit, it changes it's model and sends back to move the cursor to the end of the previous line and delete the last character.
I'm using xterm 4.4 with Xamarin.Android and Xamarin.iOS. Confirmed that this still repros in version 4.5.
When there's more than 1 line of user input, the cursor is stuck at the 0 x position of the current line and the previous text cannot be removed, but the text-area element which takes in the actual input does respect the user keystrokes.
"What is this why is this happening" is typed in the user input, both the text area element and the displayed content(div class ="xterm-accessibility-tree") respect the input change. "What is this why is t" is the first line, and the text after that, "his happening" is on the second line.

When removing text by backspace key, the text on the line which the cursor is on is removed, but the cursor gets stuck in the 0 x position of the current line and does not move to previous line. Pressing the backspace key repeatedly does not remove the text that's displayed in the previous line, but the text-area which is the actual input does respect the backspace key and has the correct input. This is the screenshot after I removed some text and is only left with "what ".

You can see that the text area element has "what ", but the displayed content's last div still has "what is this why is t".
Expected behavior:
What is being displayed should behave the same way as the text area does. While the user is typing something in the input, the displayed content should respect the changes the user makes.
The text was updated successfully, but these errors were encountered: