GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

BUG: update listener triggered on initial load #3071

Closed kuhelbeher closed 1 year ago

kuhelbeher commented 3 years ago

Hello! I found weird bug with update listener. It's triggered on initial load if html code has 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

artf commented 3 years ago

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

artf commented 1 year ago

Shouldn't be an issue anymore