Issue #5363šŸ’¬ AnsweredOpened Sep 5, 2023by rozek0 reactions

Cannot "sort" elements of layer panel

Quick answerby arbisyarifudin

Im facing same issue

Read full answer below ↓

Question

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 following error message while dragging: Additionally, upon "mouseup", I get the following error message This problem may have been introduced recently as I can remember that sorting worked several days ago...Code of Conduct[X] I agree to follow this project's Code of Conduct

Answers (4)

arbisyarifudin• Sep 6, 2023

Im facing same issue

rozek• Sep 6, 2023

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 && (this.em != null)) { help here? Note: indeed, this little "...

GJS Helper• May 17, 2026

This issue describes a critical bug within the GrapesJS Sorter module, specifically affecting the reordering of elements in the layer panel. The error messages TypeError: Cannot read properties of undefined (reading 'Canvas') during drag and TypeError: Cannot read properties of undefined (reading '...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.