GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

220 issues found

๐Ÿ” canvas
#6409Feb 18, 2025by Shuja-Mahmood4 answers
0 reactions

Cannot drag to move components on mobile

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v133 Reproducible demo link https://jsfiddle.net/2hjdrb7L/1/ Describe the bug How to reproduce the bug? Initialize a grapesjs editor using grapesjs v0.22.x with the grapesjs-touch plugin v0.1.1. What is the expected...

bamiendev

Same issue

federica-capobianco

did you manage to solve it? Facing a kind of similar issue

Shuja-Mahmood

Issue still exists in v0.22.6

#6365Jan 8, 2025by MLMarxx4 answers
0 reactions

Style Manager Fails to Interpret Descendant Selectors Correctly

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 131.0.6778.205 Reproducible demo link https://codesandbox.io/p/sandbox/naughty-microservice-5hp3h4 Describe the bug How to reproduce the bug:Add the dark-style class to the body: js editor.CssComposer.addRul...

artf

Yeah, that's not supported as there might be some performance implications trying to match any possible rule there. What you can do though is select any rule via styleManager.select

MLMarxx

Ok, thanks for clarification - currently using select, any ideas how to target media tags that way?

artf

You can get the CSSRule you need (getRule) and then pass it to styleManager.select

#6357Dec 13, 2024by Harshsne261 answer
0 reactions

!important is added to every component styles

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Harshsne/pen/YPKwRBg Describe the bug How to reproduce the bug?Add row component from blockmanager.change its width in stylemanager .(!important is added because its default...

GJSBlock

Thanks for reporting this, @Harshsne26. Great question about !important is added to every component styles. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your sp...

#6354Dec 13, 2024by RakulAgn2 answers
0 reactions

Uncaught TypeError: Cannot set properties of null (setting '_isEditor')

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grapesjs.com/demo Describe the bug How to reproduce the bug?Just Visit the Demo Site of Grapesjs the canvas not been rendered What is the expected behavior? The Canvas Should be Render...

artf

Closing this as the demo seems to run fine, maybe something related to your browser cache/extensions

GJS Helper

The Uncaught TypeError: Cannot set properties of null (setting 'isEditor') error, especially when encountered on the GrapesJS demo site with a blank canvas, indicates a critical failure during the editor's initialization process. This erro...

#6348Dec 7, 2024by Frubl2 answers
1 reactions

It's possible to drag and drop literally anything inside grapesjs canvas

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Try select for example whole sidebar tools/text/everythingGrab and drop it on canvas What is the expected behavior? Pro...

artf

You can take control over what is dropped inside the canvas via canvas:dragdata event https://jsfiddle.net/artur_arseniev/87rcb24n/

GJS Helper

The issue you've reported, where arbitrary elements from outside the GrapesJS canvas (including parts of the editor's UI) can be dragged and dropped into the canvas, is a common behavior stemming from the browser's native drag-and-drop fun...

#6332Nov 26, 2024by tim-prom1 answer
0 reactions

Img srcset 404 causes infinite request loop

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v131Reproducible demo link https://jsfiddle.net/cmq9end2/1/Describe the bug How to reproduce the bug?Add an img to the canvas with an invalid URL in the srcset Check the network tab in Chrome dev console - the asset r...

GJS Helper

The issue you've described, where an <img> tag with an invalid srcset attribute (and no src attribute) causes an infinite 404 request loop, is a known behavior in some browsers (like Chrome) rather than a direct bug within GrapesJS itself....

#6324Nov 22, 2024by badiuciprian4 answers
2 reactions

Sorter.setDragHelper is not a function on block drag

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? 131.0.6778.86Reproducible demo link https://jsfiddle.net/badiuciprian/qe28obhr/1/Describe the bug How to reproduce the bug?try dragging any block to the canvas What is the expected behavior? The component is rendered to the...

mohamedsalem401

I managed to reproduce it. It's only happening on nativeDnD: false. Probably this makes the block view use the API of the old sorter. I will try to push a fix for this.

artf

@mohamedsalem401 can you check this one, please?

badiuciprian

Thanks for taking care of this. I will watch for the update.

#6296Nov 5, 2024by maneeshp972 answers
0 reactions

Custom react components gets wrapped inside a div

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Arc v1.61.1 Reproducible demo link https://codesandbox.io/s/grapesjs-react-components-n6sff Describe the bug @artf First of all thank you for this amazing library. I was trying to create custom react components within grap...

artf

Yeah, that's expected from the demo perspective. You can play around with the code and find your solution but I'm closing this as it's not a core bug.

GJS Helper

The behavior you're observing, where custom React components are wrapped inside an extra div with GrapesJS-specific attributes, is fundamental to how GrapesJS manages components in the DOM. This div is not an "extra" wrapper in the GrapesJ...

#6269Oct 25, 2024by bt-mkt4 answers
3 reactions

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

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 canv...

artf

@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

@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

@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 wa...

#6248Oct 22, 2024by Frubl2 answers
1 reactions

ShowOffsets bug when iframe body has zoom

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://jsfiddle.net/a2hbxg0y/1/ Describe the bug How to reproduce the bug?Open dev tools and write element style for iframe body - zoom: n; What is the current behavior? When hovering over an...

artf

You shouldn't edit the zoom of the iframe, use the native API

GJS Helper

You've identified a specific bug in GrapesJS related to the showOffsets feature when the iframe body has a CSS zoom property applied. This is a valid observation, and I can confirm the behavior you described. Issue Confirmation When zoom i...

Browse all topics