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

Absolute positioned decoration widget cases duplicate Chinese punctuations input #1500

Open
xiaody opened this issue Dec 26, 2024 · 0 comments

Comments

@xiaody
Copy link

xiaody commented Dec 26, 2024

https://stackblitz.com/edit/typescript-pdavyjku?file=style.css,index.ts,index.html

This repo contains a simplified placeholder plugin we are using, and we notice this bug in recent versions of Chrome(at least Edge/131 and Chrome Canary/133; I also tried QQBrowser(chromium 116), which is ok), Windows specifically.

step 1: put cursor at the start of the line.
image

step 2: with Chinese IME on, type a Chinese comma(press ,), and with high chances we unexpectly got two commas.
image

notice only inputing punctuations causes this bug, not other Chinese characters like 你好 with a longer composition process.

Removing the position: aboslute of the placeholder somehow solves this magicly(with a very high chance but not 100%), but we'd prefer keeping the style so it looks better if the line is text-align: right, and the cursor won't jump if arrow keys are pressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant