GrapesJS Issues

3,464 parsed GitHub issues — 370 solved · 90 open. Search, filter and explore battle-tested answers.

569 issues found

🔍 canvas
#6707February 13, 2026by saeedhbi1 answer
0 reactions

Cannot read properties of null (reading 'hasFocus') in Canvas module

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome (versions 142-144), Safari (versions 16.3, 26.1), Maybe others too Reproducible demo link https://jsfiddle.net/saeedhbi/tqfe7p04/ Describe the bug How to reproduce the bug? Initialize a GrapeJS editor (v0.22.11 or v...

ClaudeCode

Thanks for reporting this, @saeedhbi. Great suggestion about Cannot read properties of null (reading 'hasFocus') in Canvas module! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. U...

#6706February 13, 2026by saeedhbi3 answers
0 reactions

TypeError: e.getRoot is not a function (Race condition in Style Manager)

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? All browsers (Chrome, Safari, Firefox, Edge) Reproducible demo link https://jsfiddle.net/saeedhbi/powxyjdq/3/ Describe the bug How to reproduce the bug? Initialize a GrapeJS editor Select a component in the canvas Quickly...

artf

Similar to https://github.com/GrapesJS/grapesjs/issues/6705 I'm not able to create that kind of race condition (eg. select and remove via API) and in your example is checking getRoot on a component, but there is no such a method on the Com...

saeedhbi

Same as https://github.com/GrapesJS/grapesjs/issues/6705#issuecomment-3921025039, the issue was in our external library that was using GrapeJS and since had same situation like the issue 6705, I will close it. Thank you for your review.

ClaudeCode

Thanks for reporting this, @saeedhbi. Great question about TypeError: e.getRoot is not a function (Race condition in Style Manager). The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS...

#6705February 13, 2026by saeedhbi3 answers
1 reactions

TypeError: Cannot read properties of undefined (reading 'toLowerCase') in keyboard handler

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? All browsers (Chrome, Safari, Firefox, Edge) Reproducible demo link https://jsfiddle.net/saeedhbi/tdsLa6qe/ Describe the bug How to reproduce the bug? Create a basic GrapeJS editor (version 0.22.11 or 0.22.14) Add an input...

saeedhbi

Hi @artf, After digging deeper into the full stack trace, I found that the error is not in GrapesJS. The event.key.toLowerCase() call is coming from our own application code — a global window.addEventListener("keydown", ...) handler that w...

artf

Hey @saeedhbi, where exactly do you see event.key.toLowerCase() in our code? Are you sure is not coming from your side? Unfortunately, the jsfiddle is not helpful, seems too much AI slopped 😅, it's not even loading the editor. Maybe you c...

ClaudeCode

Thanks for reporting this, @saeedhbi. Great question about TypeError: Cannot read properties of undefined (reading 'toLowerCase') in keyboard handler. The recommended approach with Canvas is to use the event-driven API. Start here: Check t...

#6696February 4, 2026by jasonvijayy1 answer
0 reactions

Crash when calling component.replaceWith() during lifecycle events with UndoManager enabled

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Logeshwaran-codepen/pen/raLJpYb Describe the bug How to reproduce the bug? Select components that available in canvas. Listen to a lifecycle event (e.g. component:selected)...

ClaudeCode

Thanks for reporting this, @jasonvijayy. Great question about Crash when calling component.replaceWith() during lifecycle events with UndoManager enabled. The recommended approach with ProseMirror is to use the event-driven API. Start here...

#6695February 2, 2026by Axel3031 answer
0 reactions

Prevent default not working for edge

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Edge 144.0.3719.92 Reproducible demo link https://jsfiddle.net/L61f0qtz/ Describe the bug How to reproduce the bug? Open GrapesJS editor in Microsoft Edge. Add a keymap for saving using either Ctrl+S or Ctrl+Shift+S with {...

ClaudeCode

Thanks for reporting this, @Axel303. Great question about Prevent default not working for edge. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look...

#6690January 16, 2026by HavokInspiration1 answer
0 reactions

CSP violations

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 143.0.7499.193 Reproducible demo link https://grapesjs.com/demo.html Describe the bug Hello. How to reproduce the bug? Import GrapeJS in a JS file / Node env : on a webpage using strict CSP rules, for instance : Doi...

ClaudeCode

Thanks for reporting this, @HavokInspiration. Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date. For you right now: Run npm audit fix to see available patches Check for a newe...

#6685January 12, 2026by shery4 answers
0 reactions

Custom component styles are not applied after deletion and re-addition

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v143.0.7499.193 Reproducible demo link https://codesandbox.io/p/sandbox/2l3887 Describe the bug How to reproduce the bug? Open the page and load the GrapesJS editor Select the Row component and delete it Click the R...

mdmontesinos

I'm facing a similar issue, where the re-added component has the correct styles property: <img width="1112" height="17" alt="Image" src="https://github.com/user-attachments/assets/474011c4-b1be-48df-9aa8-14c3dcdfc68d" /> But if I use the "...

artf

@mdmontesinos your usage is not correct, styles has to be defined at the component definition, and it's not expected to change. Also, it's wrong to use IDs for component definition if the component is expected to be reused, the ID will be...

mdmontesinos

@artf I'm using an ID because there will always be a single instance of that component in my project. My use case is that a component is designed externally to be used as a "background" and then imported into projects that use it. Therefor...

#6671December 9, 2025by padcom2 answers
1 reactions

`component.closestType()` is undefined

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://github.com/padcom/grapesjs-closestType-missing Describe the bug This bug was introduced in here. Before this change everything was working as expected. I presume the reset event is respon...

padcom

It turns out the second parameter is not always the component but the sender of the event which means that sometimes it is the collection of components which obviously doesn't have the closestType() method. Thanks @artf for explaining it t...

ClaudeCode

Thanks for reporting this, @padcom. Great question about component.closestType() is undefined. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look...

#6669December 5, 2025by pierodetomi3 answers
0 reactions

Cross-level reordering of blocks in Layer Manager causes Sorter errors and breaks further move attempts

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? Start from a fresh editor instance with an empty canvas From the Blocks panel, drag a "1 Column" block into the canvas...

lexoyo

I guess it is the same as this bug too?

pierodetomi

I don’t think it’s the same issue. In the one you linked, items are disappearing, while in my case the Layer Manager ends up in a state where you can’t move a layer anymore. They might be related at a higher level as “Sorter-related proble...

ClaudeCode

Thanks for reporting this, @pierodetomi. Great question about Cross-level reordering of blocks in Layer Manager causes Sorter errors and breaks further move attempts. The recommended approach with Canvas is to use the event-driven API. Sta...

#6666November 28, 2025by lexoyo2 answers
2 reactions

Layer panel: drag and drop makes items disappear (firefox and chrome)

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 137.0 and Chrome 136.0.7103.92 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug? Open the official demo https://grapesjs.com/demo.html To reproduce the exact same stru...

pierodetomi

I can confirm I’m seeing the same issue, and it’s caused by the disappearing element having a computed height of 0px (because it’s using display: none). While this is definitely a bug, as a temporary workaround you can avoid using display:...

ClaudeCode

Thanks for reporting this, @lexoyo. Great question about Layer panel: drag and drop makes items disappear (firefox and chrome). The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS docum...