question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to Add Components to Blank Canvas

See original GitHub issue

After digging into a bug my team has seen after upgrading from grapesjs v0.18.4 to v0.19.5. I started looking into the grapesjs-mjml plugin specifically to see if this could be the thing causing it and appears this might be the cause.

Specifically, when we start with a blank canvas, we are now unable to add components. When there are already components on the canvas, I can perform all the normal CRUD operations with components using the DnD functionality.

Bug Summary:

When the canvas is is blank, I cannot add components, however, when there are already components on the canvas, I can add them without issue. It is unclear if there is any correlation with grapesjs’s changes from 0.18.4 to 0.19.5.

With Components (default example from grapesjs-mjml after running npm run start):

screen-capture (21).webm

Without Components (i.e., all components deleted so that all is left is a blank canvas):

screen-capture (22).webm

Full Warning/Error Output:

{
    "errors": [
        "Target collection not found",
        "Component not draggable, acceptable by [[data-gjs-type=mj-body], [data-gjs-type=mj-wrapper]]"
    ],
    "model": {
        "tagName": "mj-section",
        "type": "mj-section"
    },
    "context": "sorter",
    "level": "warning"
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
Drew-Danielscommented, Sep 22, 2022

You can update the commit #296

That’s what I’d like to do, however the more I’ve looked into this today it appears that the problem I’m facing in my setup might be a problem with using grapesjs-mjml with React https://github.com/artf/grapesjs-mjml/issues/223 . Going to keep looking into this further to see if I can get a better idea of what’s going on.

1reaction
Drew-Danielscommented, Sep 22, 2022

Huh, that works for me as well… Thanks for sharing that! I’ll try using this fix in the project I’m working on and see if that works there also. Might be something to push up in a PR to this repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Firefox, unable to drag components unto an empty canvas
Tried this in grapesjs.com/demo: click "Empty canvas" to empty the canvas; try to drag any component from the blocks menu into the canvas, ......
Read more >
Canvas component overview (contains video) - Power Apps
Create a blank canvas app. In the Tree View, select Components and then select New component to create a new component. Create new...
Read more >
Can't add script component... - Unity Forum
Things to try: 1. Make sure the script is not located in a folder called Editor. 2. Copy the script physically away to...
Read more >
2579837 - User cannot Edit Report Canvas - SAP Support Portal
Reproducing the Issue · Go to Report Center · Select a Canvas Report · Edit the Report > Report Open and ready to...
Read more >
Create and insert component instances - Figma Help Center
Click and drag the component into the canvas to create an instance of that component. Local components and libraries in the Assets panel ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found