an exception happens when I drag one widge to another(acceptWidgets :true)
Subject of the issue
i can drag widge between two placeholder,it seems fine on browser but actually an exception happens
this is the exception
gridstack.js:885 Uncaught TypeError: Cannot set property '_grid' of undefined
at HTMLDivElement.
Your environment
- version of gridstack.js
- which browser and its version
Steps to reproduce
<br/>
<div class="grid-stack">
<div class="grid-stack-item " data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4" >
<div class="grid-stack-item-content" style="background-color:lightblue;color:lightblue">
<div class="grid-stack">
<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="3" data-gs-height="1"><div class="grid-stack-item-content">1</div></div>
<div class="grid-stack-item" data-gs-x="3" data-gs-y="0" data-gs-width="3" data-gs-height="2"><div class="grid-stack-item-content">2</div></div>
<div class="grid-stack-item" data-gs-x="6" data-gs-y="0" data-gs-width="3" data-gs-height="3"><div class="grid-stack-item-content">3</div></div>
<div class="grid-stack-item" data-gs-x="9" data-gs-y="0" data-gs-width="3" data-gs-height="4"><div class="grid-stack-item-content">4</div></div>
</div>
</div>
</div>
</div>
$(function () { var options = { cell_height: 80, verticalMargin:2, acceptWidgets: true }; $('.grid-stack').gridstack(options); });
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Got this error too, anybody knows why this occurs?
This is resolved in current v0.4.0.
v0.4.0.
This is resolved in current
v0.4.0.
I still see this issue in v0.4.0. Is there any work around for this.
Uncaught TypeError: Cannot set property '_grid' of undefined
at HTMLDivElement.
Steps:
1. I have Empty grid with acceptWidgets :true.
2. Dropping widget from jqueryUi draggable.
3. resize/ move the widget which is dropped.
4. Try to drop one more new widget.
4.1 No places holder is shown.
4.2 On drop the above js error comes.

- I have Empty grid with acceptWidgets :true.
- Dropping widget from jqueryUi draggable.
- resize/ move the widget which is dropped.
- Try to drop one more new widget. 4.1 No places holder is shown. 4.2 On drop the above js error comes.
I have the same issue, even with the newest version (v0.5.5)
I'm pretty sure I ran into this ("fixed error when dragging add item over the trash, and then over second grid" commit msg) and fixed the assert it as part of #1096 please use latest 0.5.5-dev code and let me know - in the next release.