ckeditor / ckeditor5

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

Maximum call stack size exceeded when opening large document #15120

Closed rejhgadellaabsl closed 1 year ago

rejhgadellaabsl commented 1 year ago

📝 Provide detailed reproduction steps (if any)

  1. Open the html file (attached, see below) and copy the contents
  2. . Paste it in an empty CKEditor

Note: We ran into this issue in Drupal 9.5.10, not entirely sure which version of CKEditor that ships?

✔️ Expected result

The content should be displayed

❌ Actual result

The page hangs for several seconds and then CKEditor crashes, the following error is logged to console:

Uncaught RangeError: Maximum call stack size exceeded
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25123)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25860)
    at f._advanceToNextRow (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:26020)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25539)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25860)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25860)
    at f._advanceToNextRow (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:26020)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25539)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25860)
    at f.next (js_VaaKAlTD75yutATkQ0pAXOdN6Ms30ZsXy7jWB93uXlU.js:468:25860)

📃 Other details

As mention above, I'm not sure which version of CKEditor ships with Drupal 9.5.10. We do not have any additional plugins installed. The CKEditor config in Drupal is the default "Full HTML editor"

Example of content that crashes CKEditor: uittr.zip


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

Witoso commented 1 year ago

Hi, AFAICS the content is a large table. This issue was recently resolved in the v39.0.2, #14785. I am not sure if this could be back ported to your Drupal version. I would reach out to the Drupal community.

rejhgadellaabsl commented 1 year ago

Thank you! For anyone running into this:

Looks like Drupal 9.5 will not receive the 39.x upgrade due to backward compat issues, but Drupal 10.x does:

Note: the links above are for CKEditor 39.0.1, so that doesn't actually include the patch for this issue, but I think it's safe to assume they will include it in a future patch version.