Droppable query selector [data-gjs-type="my-component-type"] no longer working
Ok seems like the regression was introduced by this change: https://github.com/artf/grapesjs/commit/702ba828b13bae4b64bfd7bc79f23d8909d757f4#diff-6aa74cf54855daa6ca63a5d1e8b77c44R358 I'll fix it in the next release. Thanks for the report
Read full answer below ↓Question
Hi, since the latest version, I noticed that when I use the droppable query selector using [data-gjs-type="my-component-type"] no longer seems to work.
I have added two codesandbox demos to show you the issue. I am not able to figure out what changed.
Hope it helps, thanks!
You're submitting a BUG
- Are you using the latest release (older versions are NOT supported)? Yes
- Are you facing the bug with your local copy of GrapesJS or with the current demo? Latest version available 0.14.61.
- What is the expected behavior? Components defined by type in droppable selector, would detect and allow only specified types to be dropped.
- What happens instead? Component is no longer recognized and can't be dropped into said component.
- If you're able to reproduce the bug indicate all the necessary steps
1. Create two components and blocks.
- One component has the droppable attribute selector, e.g.:
droppable: ['[data-gjs-type="test-drop"]']and the other would be the component we want to drag and drop inside the first one.
- One component has the droppable attribute selector, e.g.:
- Attach screenshots (using KAP/LICEcap), screencasts or live demo 1. Version that works with the previous release - 0.14.57 2. Version that doesn't work with the latest release - 0.14.61
To test the issue, just drag and drop the TEST block in the canvas,
and then try to drag and drop the TEST DROP block onto the TEST component.
Answers (1)
Ok seems like the regression was introduced by this change: https://github.com/artf/grapesjs/commit/702ba828b13bae4b64bfd7bc79f23d8909d757f4#diff-6aa74cf54855daa6ca63a5d1e8b77c44R358
I'll fix it in the next release. Thanks for the report
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5175
Move method is not working as expected
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://code...
Issue #3622
I18n functionality
Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es")...
Issue #5377
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 ver...
Issue #5334
Selection of custom component type not working in the canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome, Opera, Edge, etc Reproducible demo...
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
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.