CJK x Windows x Chromium Browser character duplicating / removing onClick #1551

Open
opened 2025-11-12 02:17:13 +01:00 by amiatlas · 5 comments
amiatlas commented 2025-11-12 02:17:13 +01:00 (Migrated from github.com)

Hey All 👋

Writing to surface a bug that has recently surfaced and we're finding on Confluence Editor as well as a sandbox editor. This could be related to https://github.com/ProseMirror/prosemirror/issues/1484.

What is the issue?

The problem happens on IME composing (input CJK characters). Specifically on windows chromium browser. Edge and Chrome both can repro the problem, but firefox cannot. Mac and Linux is both ok.

While typing IME composing (input CJK characters), there is a duplication or deletion of the character. After deducing all the prosemirror step and transaction fired with the error stack, it maybe related to the function readDOMChange.

Steps to reproduce

  1. Be on windows chromium, start IME composing.
  2. Click anywhere on the line
  3. Observe
  4. Expected not to duplicate/delete

Actual behavior

  • Duplicates
  • Occasional deletes
    Although the deletion is hard to replicate on sandbox, it seems as though it's more apparent on a sandbox Confluence Editor. After the trace stack we found that it is on readDOMChange had a replace step that seemingly deletes the character.

https://github.com/user-attachments/assets/70db8313-3c44-4426-b3c5-0e1f173e2a78

https://github.com/user-attachments/assets/b36715cf-04e4-4e03-b35f-d92ef010db21

Environment

https://codesandbox.io/p/sandbox/a-very-basic-prosemirror-forked-wrf3qh?file=%2Findex.html

  • Chrome version: Version 142.0.7444.135 (Official Build) (arm64)
  • Operating System: Windows 11
  • Prosemirror dependency
    "prosemirror-commands": "1.7.1",
    "prosemirror-example-setup": "1.2.3",
    "prosemirror-keymap": "1.2.3",
    "prosemirror-schema-basic": "1.2.4",
    "prosemirror-tables": "1.1.1",
    "prosemirror-view": "1.41.3"

Any help would be appreciated :D Thank you !

Hey All 👋 Writing to surface a bug that has recently surfaced and we're finding on Confluence Editor as well as a sandbox editor. This could be related to https://github.com/ProseMirror/prosemirror/issues/1484. ## What is the issue? > The problem happens on IME composing (input CJK characters). Specifically on windows chromium browser. Edge and Chrome both can repro the problem, but firefox cannot. Mac and Linux is both ok. While typing IME composing (input CJK characters), there is a duplication or deletion of the character. After deducing all the prosemirror step and transaction fired with the error stack, it maybe related to the function `readDOMChange`. ## Steps to reproduce 1. Be on windows chromium, start IME composing. 2. Click anywhere on the line 3. Observe 4. Expected not to duplicate/delete ## Actual behavior - Duplicates - Occasional deletes Although the deletion is hard to replicate on sandbox, it seems as though it's more apparent on a sandbox Confluence Editor. After the trace stack we found that it is on `readDOMChange` had a replace step that seemingly deletes the character. https://github.com/user-attachments/assets/70db8313-3c44-4426-b3c5-0e1f173e2a78 https://github.com/user-attachments/assets/b36715cf-04e4-4e03-b35f-d92ef010db21 ## Environment > https://codesandbox.io/p/sandbox/a-very-basic-prosemirror-forked-wrf3qh?file=%2Findex.html - Chrome version: Version 142.0.7444.135 (Official Build) (arm64) - Operating System: Windows 11 - Prosemirror dependency "prosemirror-commands": "1.7.1", "prosemirror-example-setup": "1.2.3", "prosemirror-keymap": "1.2.3", "prosemirror-schema-basic": "1.2.4", "prosemirror-tables": "1.1.1", "prosemirror-view": "1.41.3" Any help would be appreciated :D Thank you !
marijnh commented 2025-11-17 07:56:58 +01:00 (Migrated from github.com)

I don't see this happening when I type Korean or Chinese into the bottom of your demo. Which precise IME are you using, and which characters do you type to produce this effect? Does it also occur in the demo on prosemirror.net, or does some aspect of your setup trigger it? If so, have you isolated which aspect? Are there any browser addons active that might affect this?

I don't see this happening when I type Korean or Chinese into the bottom of your demo. Which precise IME are you using, and which characters do you type to produce this effect? Does it also occur in the demo on prosemirror.net, or does some aspect of your setup trigger it? If so, have you isolated which aspect? Are there any browser addons active that might affect this?
amiatlas commented 2025-11-19 00:49:50 +01:00 (Migrated from github.com)

Heya @marijnh 👋 Thanks for the reply !

I don't see this happening when I type Korean or Chinese into the bottom of your demo.

It's actually occasional, and also you need to click once you type while its in composition stage

Which precise IME are you using, and which characters do you type to produce this effect

Just the default windows one, and any composition language will do the trick, no specific character

Does it also occur in the demo on prosemirror.net

Not that I can try !

does some aspect of your setup trigger it

I don't think so. My set up was built from scratch, feels very vanilla prosemirror. Esp the sandbox version.

Are there any browser addons active that might affect this

Nope it was a fresh windows 11 !

Heya @marijnh 👋 Thanks for the reply ! > I don't see this happening when I type Korean or Chinese into the bottom of your demo. It's actually occasional, and also you need to click once you type while its in composition stage > Which precise IME are you using, and which characters do you type to produce this effect Just the default windows one, and any composition language will do the trick, no specific character > Does it also occur in the demo on prosemirror.net Not that I can try ! > does some aspect of your setup trigger it I don't think so. My set up was built from scratch, feels very vanilla prosemirror. Esp the sandbox version. > Are there any browser addons active that might affect this Nope it was a fresh windows 11 !
marijnh commented 2025-12-01 16:30:41 +01:00 (Migrated from github.com)

Still no luck. But note that "Click anywhere on the line. Observe. Expected not to duplicate/delete" doesn't exactly tell me what to do, so I may be doing something different from you.

Also, what is the purpose of this autoInsertZeroSpace extension, which, if this doesn't occur on the website demo, is highly likely to be the cause of this problem?

Still no luck. But note that "Click anywhere on the line. Observe. Expected not to duplicate/delete" doesn't exactly tell me what to do, so I may be doing something different from you. Also, what is the purpose of this `autoInsertZeroSpace` extension, which, if this doesn't occur on the website demo, is highly likely to be the cause of this problem?
amiatlas commented 2026-01-08 03:27:22 +01:00 (Migrated from github.com)

Happy new year ! Sorry for the delay in reply ! And thank you for replying

Still no luck. But note that "Click anywhere on the line. Observe. Expected not to duplicate/delete" doesn't exactly tell me what to do, so I may be doing something different from you.

Hmmm I think more accurately, please click on the line of the character where it was typed ! Right on the cursor :)

Also, what is the purpose of this autoInsertZeroSpace extension, which, if this doesn't occur on the website demo, is highly likely to be the cause of this problem?
This was never used :) i've imported a different sandbox for quick checking ! I will get rid of it and you can play with it again :)

Happy new year ! Sorry for the delay in reply ! And thank you for replying > Still no luck. But note that "Click anywhere on the line. Observe. Expected not to duplicate/delete" doesn't exactly tell me what to do, so I may be doing something different from you. Hmmm I think more accurately, please click on the line of the character where it was typed ! Right on the cursor :) > Also, what is the purpose of this autoInsertZeroSpace extension, which, if this doesn't occur on the website demo, is highly likely to be the cause of this problem? This was never used :) i've imported a different sandbox for quick checking ! I will get rid of it and you can play with it again :)
marijnh commented 2026-01-08 10:11:26 +01:00 (Migrated from github.com)

Still no luck. Please tell me the exact keyboard style you are using, what keys you're pressing in what order, including mouse clicks, and what the expected output string is (note that, not knowing Hangul, I can't evaluate the results of my typing very well).

Also, is the presence of the table necessary to reproduce this issue?

Still no luck. Please tell me the exact keyboard style you are using, what keys you're pressing in what order, including mouse clicks, and what the expected output string is (note that, not knowing Hangul, I can't evaluate the results of my typing very well). Also, is the presence of the table necessary to reproduce this issue?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror#1551
No description provided.