BUG: component:styleUpdate / component:styleUpdate:propertyName not fired
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Edge 109.0.1518.70
Reproducible demo link
https://jsfiddle.net/rudacs/kr2x1mnh/
Describe the bug
How to reproduce the bug?
- Change some property in StyleManager.
- Change the width property on the StyleManager.
What is the expected behavior? The events component:styleUpdate is fired.
What is the current behavior? No events component:styleUpdate are triggered.
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (3)
Hey @rudacs did you try instead using style:property:update?
This event worked. Was it changed to this one? And for a single property? How do I get what was the component and property changed?
Tranks.
came here because I have the same issue.
Using the suggested style:property:update seems to work, but for some reason it fires on every click.
Also, how can we target a particular style property change, i.e. text-align?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5424
BUG: `component:styleUpdate` event is not fired
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 116.0.5845.187Reproducible demo link...
Issue #4601
BUG: update() of custom types added to StyleManager is no more triggered when switching between some targets.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chromium 104 Reproducible demo link https:...
Issue #6087
BUG: Undo doesn't work after a Component's innerHTML is changed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Latest Reproducible demo link https://jsfi...
Issue #4466
BUG: Change in traits does not update html
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://jsfi...
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.