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

IME helper is always 1 step behind the character, which makes the first character very broken #273

Closed
Tyriar opened this issue Sep 17, 2016 · 4 comments
Assignees
Labels
type/bug Something is misbehaving

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 17, 2016

Related to microsoft/vscode#11334

The first character shows the IME helper off screen.

image

The second character shows it where it should be on the first character.

image

The root cause of this is because we keep the textarea off screen until it a compositionupdate event fire at which point it's moved to where the cursor is. One way this issue could be fixed is by no longer hiding the textarea offscreen and instead keeping it in sync with the cursor. Syncing the position on keydown would probably fix this issue because it would happen before updatecomposition fires.

I think the only reason we moved it off screen to begin with was because some browsers show the resize handle even when the textarea has a size of 0x0. There is a standard CSS rule resize that can hide this though so it might be worth bringing it back and keeping it in sync.

textarea {
    resize: none;
}

Details

  • Browser and browser version: Chrome v52
  • OS version: Ubuntu 16.04 using Hangul IBus IME
  • xterm.js version: 59e72b8

Steps to reproduce

  1. Start demo
  2. Start inputting hanja
@Tyriar Tyriar added the type/bug Something is misbehaving label Sep 17, 2016
@Tyriar Tyriar self-assigned this Sep 17, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Sep 17, 2016

@parisk was there anything I'm missing on why the textarea helper was kept off screen?

@parisk
Copy link
Contributor

parisk commented Sep 29, 2016

Totally missed this. No @Tyriar the only reason it is kept off-screen is to make it completely invisible, so if we can achieve this by keeping the textarea in-sync, then 👍 .

I took a look at how CodeMirror handles this and it seems that it keeps the textarea in-sync as well:

image

@Tyriar
Copy link
Member Author

Tyriar commented Sep 29, 2016

@parisk the comment in the code mentions the cursor in IE, I wonder if this was fixed in IE 11+ in which case we don't really care.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 1, 2018

I think this is fixed now

@Tyriar Tyriar closed this as completed Jun 1, 2018
@Tyriar Tyriar added the stale label Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

2 participants