GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#5386September 15, 2023by kmkaliraj1 answer
0 reactions

BUG: Cannot read properties of undefined (reading 'width')

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Edge Reproducible demo link NA Describe the bug How to reproduce the bug? Version: 0.18.2 We have the following error logged in our system from grapejs module. We are not sure in which scenario this error is thrown. TypeEr...

artf

0.18.2 it's quite an old version, you have to upgrade

#5385September 14, 2023by padcom3 answers
0 reactions

BUG: getDirtyCount() non deterministic after load

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://github.com/padcom/grapesjs-bug-dirty-count-non-deterministic/blob/master/index.html Describe the bug Currently, when the user calls await load() the dirty count is zero. Only after the...

artf

Added also load options in order to clear the editor internal state post load

padcom

Thank you! Looking forward to the next release!

artf

Already available here https://github.com/GrapesJS/grapesjs/releases/tag/v0.21.6

#5381September 12, 2023by sammrafiNo answers
0 reactions

BUG: Duplicate CSS

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 116.0.5845.187 (Official Build) (64-bit) Reproducible demo link https://jsfiddle.net/bw4Lxp6c/ Describe the bug How to reproduce the bug? When I add a column it generates duplicate CSS in @media (max-width: 768px) What is...

#5379September 12, 2023by Sw33tgt3 answers
4 reactions

BUG: Class modifications of components are not automatically detected

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 116Reproducible demo link https://jsfiddle.net/h5b0ndvL/1/Describe the bug When a component is re-rendered in the canvas, a new attribute added to the model definition get rendered, but a newly added class doe...

Sw33tgt

For the moment, as a workaround, I added this in a editor.on('component:mount', (component) => {}); function until any feedback is received. It seems to be working well. In a case where a class is removed from the definition, the removed c...

Sw33tgt

Yeah, this is intentional with classes, with your approach you won't be able to remove defined classes from the component, they will keep being added on component init. Which is fine for when a class has been forgotten on a component and w...

Sw33tgt

Something like this in the initClasses() function of Component.ts would add the new classes to the element on render. Let me know what you think :

#5378September 11, 2023by Sw33tgt3 answers
0 reactions

BUG: Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Select any component from the canvasOpen the Layer Manager PanelSelect the first "Section" componentUse...

Sw33tgt

I downgraded to v0.21.4 and I don't have the issue anymore, so this is only occurring on the latest version available.

padcom

Having the same issue in the simplest examples. Downgrading do .4 makes it go away. Regression?

artf

Yeah fixed already here. I'll push a new release for the end of this week.

#5377September 11, 2023by Akkiiiiiii3 answers
0 reactions

BUG: Error: node_modules/grapesjs/dist/index.d.ts:12551:2 - error TS1005: '?' expected. 12551 }> ? C : {}) | undefined) => (editor: Editor) => void; ~ Error: node_modules/grapesjs/dist/index.d.ts:12558:3 - error TS1005: '?' expected. 12558 }> ? C : {}) | undefined) => (editor: Editor) => void;

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeDescribe the bug After Upgrade new version 0.21.5 getting these errors . we are working with grapesjs + angular, grapesjs v 0.21.5 not available in both jsFiddle and codeSandbox right now so i'm putting a dummy link. p...

Akkiiiiiii

@artf can you please check this one

THEWebDegenerate

I use safari and chrome On Tue, Sep 12, 2023 at 10:52 PM Akshay jangid @.> wrote:@artf <https://github.com/artf> can you please check this one—Reply to this email directly, view it on GitHub<https://github.com/GrapesJS/grapesjs/issues/5377...

ghost

+1 after upgrade

#5373September 8, 2023by padcom3 answers
1 reactions

BUG: `getDirtyCount()` returns `1` after loading

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome latest Reproducible demo link https://github.com/padcom/grapes-bug-dirty-after-loading/blob/master/src/App.vue#L37 Describe the bug Clone and start the projectOpen console Current behavior: number of changes is 1 Ex...

artf

Hi @padcom this is an expected behavior as the load itself updates the state of the editor. You can simply clear the dirty counter via editor.clearDirtyCount() right after your manual load.

padcom

Please note, that if you enable autoload: and disable loading: number of changes is 0, even though the result is the same - the page is loaded. Since in my project I desperately need to be able to load the page at a specific time this is m...

padcom

I beg your pardon? Are you quite serious that it is the "expected" behavior? Have you seen that in any other editor out there that the project is automatically modified upon loading and then automatically saved? I find that hard to believe.

#5372September 8, 2023by uncldrwNo answers
0 reactions

BUG: Cannot add custom AtRule (@container, @font-face)

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Windows, Chrome, React Reproducible demo link / Describe the bug When attempting to add a custom atRules like @container or @font-face, the CSS consistently compiles to @media instead. I have tried various methods, includi...

#5363September 5, 2023by rozek3 answers
0 reactions

BUG: cannot "sort" elements of layer panel

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Offizieller Build) (arm64)Reproducible demo link noneDescribe the bug When I try to reorder the elements on my canvas by sorting them in the layer panel, I repeatedly get the followi...

arbisyarifudin

Im facing same issue

rozek

Sorter.ts:500 contains const cv = this.em!.Canvas, which is obviously wrong (as em is null or undefined) Unfortunately, I don't currently understand the code with all its abbreviations - but: would a change of line 499 to if (model?.set &&...

artf

Closing as duplicate of https://github.com/GrapesJS/grapesjs/issues/5355

#5362September 5, 2023by rozek3 answers
0 reactions

BUG: draggable/droppable property functions not called while dragging

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Offizieller Build) (arm64) Reproducible demo link none Describe the bug I've defined my own component types with type specific drag-and-drop rules: but the configured functions are...

rozek

even with draggable and droppable set to true, I cannot drag one element into another

rozek

A first workaround which helps dropping components into other components:remove dragMode:'absolute', from grapesjs.init({...})instead, add dmode:'absolute', to model.defaults of every component type you want to be draggable (and, perhaps,...

artf

In absolute mode, there is no concept of moving components inside/outside of other components. A component in absolute mode is only updated in style position, it's not moved in the DOM, that's why draggable/droppable does not make sense to...