Issue #5141💬 AnsweredOpened May 24, 2023by rajevar1 reactions

Component resets attribute values on updating traits ( first time only )

Quick answerby rajevar1

sorry, my bad. I wasn't using the latest.

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 113.0.5672.63 Reproducible demo link https://jsfiddle.net/rajevar/zLs8q97f/4/ Describe the bug This is in reference to this discussion https://github.com/GrapesJS/grapesjs/discussions/4759 How to reproduce the bug? https://jsfiddle.net/rajevar/zLs8q97f/4/From the blocks, pick Text CAT:Basic component and drag to canvas.HTML code after step-1 <div class="text-primary" id="ixci">Insert your text here </div>Update class attribute for the text component to add a new class. class-aHTML c...

Answers (3)

rajevarMay 29, 2023

sorry, my bad. I wasn't using the latest.

artfMay 27, 2023

@rajevar I can't reproduce it with the latest version, are you sure you're using the latest one?

GJS HelperMay 17, 2026

You've identified a common synchronization issue in GrapesJS related to how component attributes are managed, especially when classes are modified via the Style Manager and then other traits (like id or title) are updated for the first time. This behavior can indeed lead to unintended loss of class...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.