ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
8.8k stars 3.64k forks source link

Edge: browser tab freezes after using Microsoft Translator #15220

Open sleipold opened 9 months ago

sleipold commented 9 months ago

📝 Provide detailed reproduction steps (if any)

  1. open https://ckeditor.com/ckeditor-5/demo/feature-rich/ (or any app where the ckeditor is embedded) in Edge Browser
  2. right click somewhere in the browser tab (not in ckeditor)
  3. translate to any language
  4. browser tab freezes after ~one second

✔️ Expected result

browser-independent: browser tab should not freeze and get translated successfully

❌ Actual result

on Edge browser: browser tab freezes and has to be closed - refreshing the page does not fix it Only reproducable in Edge. Chrome and Safari are working as expected

📃 Other details


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Witoso commented 9 months ago

@ckeditor/qa-team could you check and replicate?

mabryl commented 9 months ago

Thanks for the report @sleipold.

@Witoso I can confirm that the issue is reproducible both on macOS and Windows 11. Here's what it looks like:

https://github.com/ckeditor/ckeditor5/assets/72079603/67f2b80f-712f-436e-80a8-ba74b0db8576

Basically the tab with ckeditor.com gets completely frozen and your only option to get out of it is to force close Edge.

I used the newest release of Edge (v118) in my testing on both operating systems.

Witoso commented 9 months ago

@mabryl it would be great if we could check if this is a regression: different editor version vs different Edge version. Could you plant the time for it?

It's possible that we will need to file some upstream issue to MS.

daomiaru commented 7 months ago

This is very important to us. Does the official have time to fix this bug

tgx1587900660 commented 7 months ago

We have also encountered the same problem and hope to resolve it as soon as possible, please, although we have already made suggestions to the edge team.

mabryl commented 6 months ago

I did some more testing regarding this case and the version of Edge doesn't seem to matter, as v116, v118 and v120 (the newest stable release) all suffer from this issue.

However, I was able to find the first affected version of CKE that manifests this issue: 35.3.0.

The last version that's not affected is 35.2.1, so it looks like the change to beforeInput introduced in 35.3.0 might be related to the problem @Witoso

niegowski commented 6 months ago

This looks like an infinite loop of MutationObserver. The editor is watching mutations in the DOM and reverts them to match expected content (as in model and virtual DOM), and probably this Edge extension is also watching for DOM changes and tries to replace the same text.

It looks like that extension should not translate DOM elements with the contenteditable="true" set. There is no point in translating editable areas, it would alter the content. I suggest reporting the issue to the extension developer.

Witoso commented 6 months ago

There is no point in translating editable areas, it would alter the content.

I wonder if this is true. I imagine someone would like to translate the content if they write in their native language to English. But on the other hand, this translation option actually translates to the native language (the default language of the browser), so maybe it doesn't make sense indeed.

RobertL28 commented 6 months ago

There is no point in translating editable areas, it would alter the content.

The error also occurs, if you set CKEditor to read-only mode. Most of our users are only reading a document, not writing one.

Witoso commented 6 months ago

I'm waiting for the reply from the Edge team, will ping again.