Issue #5086πŸ’¬ AnsweredOpened May 2, 2023by SagarMaria0 reactions

Style:property:update and Property onChange trigger excessively

Quick answerby artf

The behaviour is correct as style:property:update triggers on any update of the Style Manager Property (not only its value). So for your specific case you would need to update the callback in this way

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 112.0.5615.137 (Official Build) Reproducible demo link https://jsfiddle.net/SagarMaria/sunygp2f/3/ Describe the bug How to reproduce the bug?In the jsfiddle simply click on the "Hello World" component. Observe the numerous console logs.Click away elsewhere on the canvas, repeat. What is the expected behavior? style:property:update should only trigger on some style property change for the selected component What is the current behavior? style:property:update event is instead firing n...

Answers (3)

artfβ€’ May 2, 2023

The behaviour is correct as style:property:update triggers on any update of the Style Manager Property (not only its value). So for your specific case you would need to update the callback in this way

SagarMariaβ€’ May 2, 2023

Hi @artf, thanks for the quick reply, but actually, part of the problem is still that even after making a change e.g. click "center" align radio option with the if statement you suggested, subsequent selections of that component still log out style:property:update value with property and to set as...

GJS Helperβ€’ May 17, 2026

The issue you're encountering with style:property:update and Property onChange firing excessively, even on component selection, is a common point of confusion. The style:property:update event is a low-level event that triggers whenever a style property model is updated internally. When a component...

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.