Move method is not working as expected
Fix for this issue: https://github.com/GrapesJS/grapesjs/pull/5176
Read full answer below โQuestion
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codesandbox.io/s/adoring-margulis-873kdv Describe the bug Context Move component method doesn't work as expected. This piece of code doesn't work as expected. this piece of code should work. When sameParent is false and target index is 1, then it won't move to 0 to 1 position for exampleCode of Conduct [X] I agree to follow this project's Code of Conduct
Answers (4)
Fix for this issue: https://github.com/GrapesJS/grapesjs/pull/5176
Thanks @krishnaeverestengineering but this is actually the expected behaviour for moving the component inside the same parent. This is because the at should account also for the index of the component itself. So, if you try to move "Component 1" at index 0 or 1, nothing will happen. If you need to...
Thanks @krishnaeverestengineering but this is actually the expected behaviour for moving the component inside the same parent. This is because the at should account also for the index of the component itself. So, if you try to move "Component 1" at index 0 or 1, nothing will happen. If you need to...
You've identified a critical bug in the GrapesJS Component.prototype.move method. The current implementation contains two main issues that lead to incorrect component placement and, in some cases, prevent components from moving at all, especially when moving within the same parent. Root Cause Analy...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5503
ReplaceWith method doesn't have string type
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link none Describ...
Issue #4384
Index.d.ts says that components must be Backbone.Collection<Component> but the docs say Component[] is also accepted
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? AnyReproducible demo link https://grapesjs.c...
Issue #6250
Clone page prompt 'Converting circular structure to JSON'
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 129.0.6668.101Reproducible demo link...
Issue #4285
Toolbar width not resizing correctly
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v100.0.4896.127Reproducible demo link...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins โ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.
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component โ click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners โ this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.