GrapesJS / blocks-basic

Basic blocks for the GrapesJS editor
BSD 3-Clause "New" or "Revised" License
76 stars 107 forks source link

Columns not resizeable after loading them through `setComponents` #15

Closed SylvainBigonneau closed 1 year ago

SylvainBigonneau commented 5 years ago

When I put a 2 columns component in the text area, I can then resize them using the small squares on their edges. Afterwards, I save these components in my database by fetching the grapesjs data through:

const components = editor.getComponents();
const css = editor.getCss();

When I load them up using:

editor.setComponents(components);
editor.setStyle(css);

The columns can no longer be resized, while other types of components still can. If I then add another "2-columns" block, these columns that were just added can be resized. But not the ones that were loaded through setComponents

I tested it on the demonstration page (the one in gh-pages) and the error happens there too.

artf commented 5 years ago

Mmmm @SylvainBigonneau are you still able to reproduce it? If I drop the 2 columns block in the canvas and then reload the page (which does setComponents and setStyle under the hood with localStorage) I'm still able to resize them...