Issue #840Opened February 5, 2018by austinbiggs0 reactions

[Bug]: When dragging an element, misleading drop placeholder

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. screen shot 2018-02-05 at 12 58 26 pm screen shot 2018-02-05 at 12 58 36 pm

Answers (3)

artfFebruary 7, 20180 reactions

@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"

austinbiggsFebruary 7, 20180 reactions

@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

artfFebruary 8, 20180 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.