Issue #840πŸ’¬ AnsweredOpened February 5, 2018by austinbiggs0 reactions

When dragging an element, misleading drop placeholder

Quick answerby artf

@AustinTBiggs I don't know if it's just this, but your links have data-gjs-draggable=".menu nav.menu" which instead should be something like data-gjs-draggable="nav.menu"

Read full answer below ↓

Question

GrapeJs Version: 13.8 Local Copy JSFiddle: https://jsfiddle.net/austinbiggs/tgsykuq4/ This bug is a bit hard to explain, but should be pretty straight forward in recreating. I have menu links that are restricted to being draggable within the parent <nav>, however when dragging, a false drop placeholder appears at the top of the page, even though dropping there does nothing and is not allowed. The <nav> has droppable set to only allow the menu links to be dropped within. The links are only draggable within the <nav>. These screenshots demonstrate how this issue appears in my own example.

Answers (3)

artfβ€’ February 7, 2018

@AustinTBiggs I don't know if it's just this, but your links have data-gjs-draggable=".menu nav.menu" which instead should be something like data-gjs-draggable="nav.menu"

austinbiggsβ€’ February 7, 2018

@artf

While I'm confused why that change is necessary (it's a valid selector), I made the change. Unfortunately, I'm still seeing the issue.

I've updated my Fiddle to show this

artfβ€’ February 8, 2018

With .menu nav.menu you mean that you can drag only inside nested menus, maybe it supposed to be .menu, nav.menu? Here is my version and it works as expected https://jsfiddle.net/wsn33167/

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.