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

Backspace can not erase the last one character during Chinese/Japanese IME conversion (macOS) #24981

Closed
rebornix opened this issue Apr 19, 2017 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-input-IME Editor input of characters not on keyboard electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded webview Webview issues
Milestone

Comments

@rebornix
Copy link
Member

  • VSCode Version: 1.12-Insiders
  • OS Version: macOS

The same issue as electron/electron#9173

Reproduce steps:

  1. Open any markdown file, preview
  2. Go to Search Viewlet or Git Viewlet
  3. Switch to Japanese IME
  4. Type Japanese, and then delete
  5. You have to press Delete twice when deleting last character.
@rebornix rebornix added bug Issue identified by VS Code Team member as probable bug electron-update labels Apr 19, 2017
@rebornix
Copy link
Member Author

It's actually more severe as if there is any webview, we'll receive wrong composition events in editor as well. So if you are editing markdown files in Japanese with Preview open, you'll run into the same issue. cc @mattbierner

@rebornix rebornix added editor-input-IME Editor input of characters not on keyboard webview Webview issues labels Apr 19, 2017
@bpasero
Copy link
Member

bpasero commented Apr 22, 2017

@rebornix does this only reproduce in native input fields or also inside the editor? any clue for a workaround or fix? I fear this could block our electron update...

@bpasero bpasero added this to the April 2017 milestone Apr 23, 2017
@bpasero
Copy link
Member

bpasero commented Apr 23, 2017

I just confirmed that this also happens in the editor as long as there is a webview open.

@rebornix
Copy link
Member Author

rebornix commented Apr 23, 2017

@bpasero when there is a webview, the composition state is not updated at all. Take below as example

  • Press a, and we get ��あ
  • Press Backspace, we get a backspace keydown event, however, we didn't get any composition related event.
  • Press another Backspace, we get compositionEnd event.

This problem only occurs when you only have one character/phonetic radical left. For IME using phonetic composer, like Simplified Chinese and Japanese Hiragana, we can detect whether there is only one single phonetic radical left. However for IME using radical composer, like Traditional Chinese and Korean Hangul, they are behaving differently. Traditional Chinese has this issue as well but Korean Hangul doesn't. Even though we might be possible to hack it around by checking Locale/IME but it's too hacky.

The events emitted by browser align with the behavior of input box. I can't reproduce this issue with latest Chromium Version 57.0.2987.133 (64-bit).

@rebornix rebornix changed the title Backspace can not erase the last one character during Japanese IME conversion (macOS) Backspace can not erase the last one character during Chinese/Japanese IME conversion (macOS) Apr 23, 2017
@rebornix
Copy link
Member Author

rebornix commented Apr 23, 2017

This is not just Japanese, I can also reproduce this problem with Chinese IME.

Once there is a webview, all viewlets are affected, including Editor and Integrated Terminal. cc @Tyriar

@bpasero bpasero modified the milestones: Backlog, April 2017 Apr 24, 2017
@bpasero
Copy link
Member

bpasero commented Apr 24, 2017

Since I am not expecting a fix on our end, moving to backlog until we go for a more recent electron version.

@bpasero bpasero added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Apr 24, 2017
@rebornix
Copy link
Member Author

I tried to get an idea of how bad it is by writing a fresh new blog post in Chinese, thinking, writing and tweaking the content. Within 30 minutes, I wrote 900 characters and ran into this issue 7 times. Current behavior is annoying to me, it's just weird. So I'll say it's not a blocker.

Besides, once you open a webview, you'll have this issue always. It means you open Markdown Preview, and then close it, you still have this backspace issue in editor and anywhere else. The only way to get rid of it is restarting VS Code.

@bpasero
Copy link
Member

bpasero commented Apr 25, 2017

Looks like this is a Chrome issue (as reported by Kevin here: https://bugs.chromium.org/p/chromium/issues/detail?id=714771) which means we will not get a fix until Chrome has fixed this or provided a workaround.

@rebornix given that, do you think we can add a hack to make this work or is there nothing we can do from our end?

@rebornix
Copy link
Member Author

@bpasero as it's affecting native input/textarea and js events, I don't have an idea of how to hack it right now.

@bpasero bpasero added the electron Issues and items related to Electron label Apr 29, 2017
@chezou
Copy link

chezou commented Jul 11, 2017

As of now, the Chromium issue has been fixed. Is there any plan to bump it? I confirm it happens on Windows/Ubuntu.

@bpasero
Copy link
Member

bpasero commented Aug 21, 2017

@rebornix since we updated to a more recent Electron version, I think this issue is resolved. At least a fix from Chrome was backported: electron/libchromiumcontent#300

@chezou
Copy link

chezou commented Aug 29, 2017

Has the same issue on Windows with VSCode 1.15.1.

@rebornix
Copy link
Member Author

rebornix commented Aug 30, 2017

@bpasero thanks. I no longer see this issue in latest Insider (1.16-insider), so this issue would disappear from our next Stable.

@rebornix rebornix added the verification-needed Verification of issue is requested label Aug 30, 2017
@rebornix rebornix modified the milestones: August 2017, Backlog Aug 30, 2017
@Tyriar Tyriar added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Sep 1, 2017
@chezou
Copy link

chezou commented Sep 23, 2017

Does this problem fix with 1.16.1?

This issue still occurs with VSCode v1.16.1 on Windows 10 using Google Japanese IME.

Video: https://youtu.be/Wq2LzSv4p1Q
This example is inputting single "の" (n-o) character deletes "量" unintentionally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-input-IME Editor input of characters not on keyboard electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

5 participants
@rebornix @bpasero @chezou @Tyriar and others