Issue #6269πŸ’¬ AnsweredOpened Oct 25, 2024by bt-mkt3 reactions

Component model and view inits every time it's dragged over every component present in Canvas on which it can be dropped into

Quick answerby artf❀ 1

@mohamedsalem401 this is probably happening due to the shallow editor. I think it would make sense to leverage the temporary option (which we already use to skip some actions) in canMove. wdyt?

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 130.0.6723.59 (Official Build) (arm64) Reproducible demo link https://codepen.io/btmkt/pen/QWeOJRB?editors=1111 Describe the bug How to reproduce the bug?Open console.Drop multiple components inside the canvas(easy to reproduce with 3 columns for example).Drag the test-comp component added at the end in the extra category over the added components. What is the expected behavior? The component model and view init events (at least, not sure if there are others) should trigger only whe...

Answers (4)

artfβ€’ Nov 5, 2024

@mohamedsalem401 this is probably happening due to the shallow editor. I think it would make sense to leverage the temporary option (which we already use to skip some actions) in canMove. wdyt?

mohamedsalem401β€’ Nov 5, 2024

@artf Yes, I suspect it has to do with the shallow editor. Hopefully the temporary option will work and then I'll open a PR

bt-mktβ€’ Nov 8, 2024

@mohamedsalem401 this is probably happening due to the shallow editor. I think it would make sense to leverage the temporary option (which we already use to skip some actions) in canMove. wdyt? Hello @artf, The change above, which I saw was implemented, doesn't seem to fix the behaviour I encounter...

GJS Helperβ€’ May 17, 2026

The behavior you're observing in GrapesJS v0.22.x, where component model init and view initialize events trigger multiple times during drag-and-drop (on hover and twice on drop), is a change from v0.21.x and earlier versions. This is likely due to enhancements in the drag-and-drop mechanism, where...

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.