Issue #3071Opened October 13, 2020by kuhelbeher0 reactions

BUG: update listener triggered on initial load

Question

Hello! I found weird bug with update listener. It's triggered on initial load if html code has <img> tag with class attribute:

const editor = grapesjs.init({
  container: "#gjs",
  storageManager: { type: 0 },
  plugins: [],
  components: `
    <img src="https://images.unsplash.com/photo-1602536062611-8996fd6f8149?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1998&q=80" alt="Some alt text" class="centered"/>
  `
});

editor.on("update", () => {
  console.log("udpdated");
});

You can check live demo in this sandbox

Answers (2)

artfOctober 13, 20200 reactions

I'm not sure why it's happening but I'd not assign a high priority to the issue for 1 false-positive update. So, if anyone would like to help in debugging this I'd appreciate

artfJuly 26, 20230 reactions

Shouldn't be an issue anymore

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.