Too much recursion
Hey @jlafosse thanks for the report. I'd not expect that issue with the latest version: <img width="123" alt="Screenshot 2024-10-21 at 19 00 04" src="https://github.com/user-attachments/assets/ff074a31-cd19-4547-bb27-596c92e16d64"> Can you try to check again, please?
Read full answer below ↓Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Firefox 131.0.2
Reproducible demo link
https://grapesjs.com/demo-newsletter-editor.html
Describe the bug
How to reproduce the bug?
- Go to the grapesjs demo, then import the following html:
<div class="foobar">
<img data-gjs-locked="true" width="500" src="https://cdn.pixabay.com/photo/2021/12/16/15/26/forest-6874717_1280.jpg">
</div>
- Open your browser console.
- Rapidly click on the image multiple times.
What is the expected behavior? Should work without errors.
What is the current behavior? This causes a recursion error in FireFox. Chrome does not seem to be affected by this issue. I am testing this on OSX 13.6.9 and I have included a short screen recording.
Uncaught InternalError: too much recursion
getList Component.ts:1931
ensureInList Component.ts:1866
ensureInList Component.ts:1880
Ke Underscore
Backbone Backbone
ensureInList Component.ts:1880
ensureInList Component.ts:1880
Ke Underscore
Backbone Backbone
ensureInList Component.ts:1880
ensureInList Component.ts:1880
My suspicion is that the issue is coming from the following function: https://github.com/GrapesJS/grapesjs/blob/dev/packages/core/src/dom_components/model/Components.ts#L373
Thanks.
https://github.com/user-attachments/assets/54b6c40f-d435-41f9-a09f-47450f01523e
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (4)
Hey @jlafosse thanks for the report.
I'd not expect that issue with the latest version: <img width="123" alt="Screenshot 2024-10-21 at 19 00 04" src="https://github.com/user-attachments/assets/ff074a31-cd19-4547-bb27-596c92e16d64">
Can you try to check again, please?
Indeed, that appears to have fixed the issue! Thank you!
🙌 closing then, thanks 🙇♂️
Thanks for reporting this, @jlafosse.
Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date.
For you right now:
- Run
npm audit fixto see available patches - Check for a newer GrapesJS version that may have already addressed this
- If available, test the latest stable release before upgrading
- If the vulnerability is critical,
npm audit fix --forceis an option, but test thoroughly
Understanding the risk:
- Review the specific vulnerability details on GitHub Security Advisories
- Not all high-severity issues affect your code path
- Some vulnerabilities only trigger under specific conditions
Staying current:
- Watch for new GrapesJS releases
- Subscribe to security notifications on the repo
- The team prioritizes security updates in their release cycle
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6271
Drag and drop of components doesn't work on latest Firefox
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 131.0 (64-bit) on Linux and Mac Re...
Issue #5923
GrapeJs not loading on browsers sometimes
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Firefox 126.0.1Reproducible demo link https:...
Issue #6152
CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #5556
Too many classes will cause the webpage to crash
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda: What to Choose for Your Business in 2026
Choosing the right website platform in 2026 is no longer just about building a site
Tutorial
GJS Market 2.0 - Donations, Tracking, Labels and Better Product Discovery
We’ve rolled out a new set of GrapesJS marketplace updates across GJS Market, focused on improving how creators distribute products
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.