BUG: do not use component.addAttributes({[traitName]:value}), you should use component.set(traitName, value) sometimes
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Chrome 108.0.5359.125
Reproducible demo link
https://codesandbox.io/s/sweet-hugle-w00pqx
Describe the bug
How to reproduce the bug?
- drag my block
- view code
What is the expected behavior? do not want trait2="trait2"
What is the current behavior? has trait2="trait2"
If is necessary to execute some code in order to reproduce the bug, paste it here below:

Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4851
BUG: this.on('change:attributes:type', this.handleTypeChange) do not support array type
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 108.0.5359.125Reproducible demo link...
Issue #6590
BUG: Able to access/delete/drag the locked components in layermanager
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? chrome Reproducible demo link https://code...
Issue #5037
FEATURE: How to drag external text into particular index inside the textable component?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link NA Describe...
Issue #4929
BUG: a tag inside button is removed
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome LatestReproducible 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.