Issue #5584Opened December 27, 2023by vian0130 reactions

BUG: "storage:end:load" event is not triggered when all components are mounted into the canvas

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome v91

Reproducible demo link

https://grapesjs.com/demo.html

Describe the bug

How to reproduce the bug? Recently I have to upgrade grapesjs v0.14.62 to the latest version (0.21.8). In the old code, we used "storage:end:load" to do some stuff after all the components have been mounted on the canvas.

But in the current version it won't work the same anymore. As I see in the documents, "storage:end:load" will now be triggered as soon as the storage's load request is done. Is there anyway or other event to achieve the same result as before?

For now I have to use setTimeout insided "storage:end:load" callback, which seems quite uncertain and unreliable in many cases.

What is the expected behavior? "storage:end:load" is triggered after all components have been mounted on the canvas.

What is the current behavior? "storage:end:load" is triggered as soon as the storage's load request is done.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (1)

artfJanuary 9, 20240 reactions

@vian013 please open bug issues only with a reproducible demo link, by a quick check the event seems to work properly

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.