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

Using IME with markdown preview enabled, press ESC/BACKSPACE leads in control characters #37114

Open
timonwong opened this Issue Oct 30, 2017 · 34 comments

Comments

Projects
None yet
@timonwong
Copy link

timonwong commented Oct 30, 2017

  • VSCode Version: 1.17.2
  • OS Version: macOS 10.11.6

Steps to Reproduce:

HINT: You may need to enable editor.renderControlCharacters in order to see what happens, or the control characters is invisible.

  1. Open a "markdown preview" in a split (just ensure the markdown preview is visible).
  2. In another split, edit arbitrary file with IME (mine with Chinese Pinyin).
  3. Type some characters using IME, before put them on screen, type backspace/esc to see what happens.

Just see the screenshot for example:

hmmm

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the markdown label Oct 30, 2017

@mjbvz mjbvz removed the markdown label Oct 30, 2017

@mjbvz mjbvz assigned rebornix and alexandrudima and unassigned mjbvz Oct 30, 2017

@rebornix

This comment has been minimized.

Copy link
Member

rebornix commented Nov 15, 2017

It only happens when you are previewing the markdown content, which means it's caused by the webview.

@rebornix

This comment has been minimized.

Copy link
Member

rebornix commented Nov 16, 2017

It turns out that when we preview the md content, the webview will lead to the problem as described in #24981 (you need to double backspace to delete characters). This problem was introduced in Electron 1.5.x, fixed by backporting in 1.6.x, apparently they forgot to backport the fix in 1.7.x. Ideally this can be fixed once we adopt 1.8.x.

More info electron/electron#9173 (comment) , cc @bpasero @Tyriar

@gaoliang

This comment has been minimized.

Copy link

gaoliang commented Dec 15, 2017

In version 1.19.0, this is not the only problem in the markdown file, but all the files will appear.

复现

@Proxy305

This comment has been minimized.

Copy link

Proxy305 commented Dec 27, 2017

From my observation, this issue only triggers as long as I have more than one editor opened, or have the side bar extended. This issue goes away immediately after the closing all the extra editors AND the sidebar, however reoccurs after the extension of side bar or the opening of extra editors.

More IMEs and file type could be affected. The built-in Japanese IME of macOS is affected, and TeX(.tex) files are also affected.

  • VSCode version: 1.19.1
  • macOS version: 10.12.6
@gaoliang

This comment has been minimized.

Copy link

gaoliang commented Jan 22, 2018

any update?

@chenxinlong

This comment has been minimized.

Copy link

chenxinlong commented Feb 9, 2018

When you push files with these control characters to github, it would be replaced with character " � " like :
image

In edit mode on github, seems chrome render these characters as a red dot, like :
image

@Tidyzq

This comment has been minimized.

Copy link

Tidyzq commented Mar 29, 2018

+1

@tzing

This comment has been minimized.

Copy link

tzing commented Apr 7, 2018

similar issue here:
if one put an emoji which is longer than 2 byte (for example 🇺🇸, \xe7\xbe\x8e\xe5\x9c\x8b) and hit the backspace, it will left an invisible symbol in the editor (🇺, \xf0\x9f\x87\xba)

@malun666

This comment has been minimized.

Copy link

malun666 commented Apr 17, 2018

Open User Setting, then add "editor.renderControlCharacters": true, . Just, help for show the invisible symbol .
+1

@h12345jack

This comment has been minimized.

Copy link

h12345jack commented Apr 18, 2018

similar mistakes happened in the latex edit scene

@jaggerwang

This comment has been minimized.

Copy link

jaggerwang commented May 4, 2018

+1 same problem

@acbetter

This comment has been minimized.

Copy link

acbetter commented Jun 8, 2018

+1 and I have the same problem. Newest stable version VS Code and macOS 10.13.5.

@rebornix

This comment has been minimized.

Copy link
Member

rebornix commented Jun 8, 2018

From next week's Insider, this issue will no longer exist as we adopted Electron 2.0.x.

@tkow

This comment has been minimized.

Copy link

tkow commented Jun 27, 2018

Is this problem still left?
I saw updating Electron reverted.
e47a9c9

@yoyoys

This comment has been minimized.

Copy link

yoyoys commented Jun 27, 2018

@tkow I still have this problem today.

@mjbvz mjbvz added this to the Backlog milestone Jun 27, 2018

@njleonzhang

This comment has been minimized.

Copy link

njleonzhang commented Jul 16, 2018

@rebornix can I download the Insider Build? This issue persist in 1.25.1, and really annoying.

@acbetter

This comment has been minimized.

Copy link

acbetter commented Jul 16, 2018

@njleonzhang I have tried the version and the bug still left.

@lizebang

This comment has been minimized.

Copy link

lizebang commented Aug 21, 2018

+1 same problem

@bpasero bpasero removed bug labels Sep 11, 2018

@wkosea

This comment has been minimized.

Copy link

wkosea commented Oct 9, 2018

The problem still exist at version 1.28 with no way to fix the bug.
I even don't know that until I upload my code to gitHub, then I saw a large number of ?�?.

@MichEam

This comment has been minimized.

Copy link

MichEam commented Oct 24, 2018

+1 same problem

@rebornix

This comment has been minimized.

Copy link
Member

rebornix commented Oct 25, 2018

From next week's Insider, this issue will no longer exist as we adopted Electron 2.0.x.

I should be more precise when I said so. The first time when I tested it works but now on Electron 2.0.12, the bug is here again. We probably need a champion on IME from Electron side, to ensure it doesn't regress again and again.

@leisurelicht

This comment has been minimized.

Copy link

leisurelicht commented Nov 21, 2018

+1 same problem (version: 1.29.1)

@able8

This comment has been minimized.

Copy link

able8 commented Dec 1, 2018

+1 1.29.1 (1.29.1)

@InnerPeace-Wu

This comment has been minimized.

Copy link

InnerPeace-Wu commented Dec 2, 2018

It only happens when you are previewing the markdown content, which means it's caused by the webview.

It seems the problem is triggered by previewing. For latex, I tried to avoid it by setting external pdf viewer.
macos: vscode + skim
windows: vscode + sumatraPDF

@tete1030

This comment has been minimized.

Copy link

tete1030 commented Dec 3, 2018

@rebornix is there any issue created in the electron repo on the problem on version 2.0.12 ? Or has it been fixed? It seems the original issue electron/electron#9173 has been closed due to unsupported version.

@tete1030

This comment has been minimized.

Copy link

tete1030 commented Dec 4, 2018

Sorry, while I can reproduce this issue in v1.8.8, I cannot reproduce it in 2.0.7, 2.0.12, 3.0.10, 4.0.0-beta.8 .
I tested them with Electron Fiddle with the following code using macOS Pinyin input method.

<webview src="data:text/html,<input type=text />"></webview>

I tested in 2.0.12 with Electron Fiddle as suggested by electron/electron#9173 (comment), and the issue seems not reproducible in this Electron version. Am I testing it in a wrong way?

@rebornix

This comment has been minimized.

Copy link
Member

rebornix commented Dec 4, 2018

@tete1030 thanks for your help! I already left comment there ;) The trick is only input outside of the webview is running into this weird issue.

@YunanChen

This comment has been minimized.

Copy link

YunanChen commented Dec 6, 2018

+1 The same problems when using the Chinese input methods and opening the Markdown Preview Enhanced

@kouhei

This comment has been minimized.

Copy link

kouhei commented Dec 15, 2018

same problem exists in 1.30.0, but it seems to be fixed in insiders(1.31.0).
IME: MacOS default Japanese IME

@lookas2001

This comment has been minimized.

Copy link

lookas2001 commented Jan 1, 2019

same problem exists in 1.30.0, but it seems to be fixed in insiders(1.30.1).
IME: MacOS default Japanese IME

Really? My VSCode still has this problem.

macOS 10.14.1
Chinese IME of Sogou Input
Download insiders edition VSCode (1.31.0-insiders) from the official website

After I typed some word and deleted them, the bug was reproduced.

@40345839668

This comment has been minimized.

Copy link

40345839668 commented Jan 1, 2019

@kouhei

This comment has been minimized.

Copy link

kouhei commented Jan 14, 2019

same problem exists in 1.30.0, but it seems to be fixed in insiders(1.30.1).
IME: MacOS default Japanese IME

Really? My VSCode still has this problem.

macOS 10.14.1
Chinese IME of Sogou Input
Download insiders edition VSCode (1.31.0-insiders) from the official website

After I typed some word and deleted them, the bug was reproduced.

I tried it again, and then this problem was reproduced.
I was wrong. I'm sorry.

@0x4f5da2

This comment has been minimized.

Copy link

0x4f5da2 commented Jan 15, 2019

The same issue can be reproduced on macOS 10.14.2 with default Chinese IME.😅

@He2hiwei

This comment has been minimized.

Copy link

He2hiwei commented Jan 20, 2019

The same issue can be reproduced on macOS 10.14.2 too. It is is so disturbing. When will it be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment