Issue #4897Opened February 3, 2023by rudacs1 reactions

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?

  1. Change some property in StyleManager.
  2. 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)

artfFebruary 5, 20231 reactions

Hey @rudacs did you try instead using style:property:update?

rudacsFebruary 6, 20230 reactions

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.

SagarMariaApril 29, 20230 reactions

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.

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.