BUG: Malformed inline styles causing editor freeze
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Firefox 138.0.4
Reproducible demo link
https://codesandbox.io/p/sandbox/exciting-lalande-98d5vw
Describe the bug
How to reproduce the bug?
- Add page with component that has malformed inline styles
- Editor does not load and entire page becomes unresponsive. Firefox shows "This page is slowing down firefox" warning
What is the expected behavior? If editor cannot parse CSS, it would be nice to log the error in console and not block the entire app
What is the current behavior? Editor becomes unresponsive
If is necessary to execute some code in order to reproduce the bug, paste it here below:
editor.Pages.add({
component: '<h3 style="text-align: center; /* margin-top: 20px;">Test</h3>',
});
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (1)
Thanks for the report @tim-prom
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6685
BUG: Custom component styles are not applied after deletion and re-addition
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v143.0.7499.193 Reproducible demo l...
Issue #6365
BUG: Style Manager Fails to Interpret Descendant Selectors Correctly
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 131.0.6778.205 Reproducible...
Issue #5154
BUG: TS2416: Property '_up' in type 'PropertyStack' is not assignable to the same property in base type 'PropertyComposite<PropertyStackProps>'
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? ---- Reproducible demo link https://codesa...
Issue #5207
BUG: Duplicated CSS while multi page creation
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome latest Reproducible demo link https...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.