5

Setup: [gridstack] I'm using "0.4.0" merged to "1.0.0-dev" from the develop branch.

I have a column for the plugin/widget that I will drag onto the grid, so basically I use the jQueryUI for droppable and draggable.

Just discovered an issue while resizing and dragging of items around and after awhile trying to drag another into the grid generates and error "Uncaught TypeError: Cannot set property '_grid of undefined" line 933 "node._grid = self;". Screenshot is attached.

Also the "ui-draggable-handle" sticks on the grid with additional class named "ui-draggable-dragging". It totally breaks the plugin and you need to refresh the page to have all functionality back to normal but every other dragstop event.

<div id="sidebar">
   <div class="item ui-draggables"><span>{json-config}</span></div>
</div>
<div id="grid1" class="grid-stack">
   <div class="grid-stack-item">//loaded from draggables with json config</div>
</div>

http://www.screencast.com/t/snK9VR1C442

heero
  • 278
  • 4
  • 15
  • You need to provide a reproducible example. With all library loaded with html provided, I can't see any error. – MT-FreeHK Sep 21 '18 at 09:38
  • The error occur every after I dragstop a widget and I'll ty to add another draggable it sticks to the droppable. I'm still trying to fix this might be the ajax call $.post('/getplugin', data); – heero Sep 21 '18 at 09:42
  • @heero Welcome to Stack Overflow. Please provide a Minimal, Complete, and Verifiable example: https://stackoverflow.com/help/mcve – Twisty Sep 26 '18 at 05:15
  • @Twisty, yeah I would like to but I don't where I could re-create my files that would include php and database as the problems arises when loading a plugin on gridstack from a json-config file. – heero Sep 26 '18 at 05:45
  • @Twisty, yeah I would like to but I don't know where I could re-create my files that would include php and database as the problems arises when loading a plugin on gridstack from a json-config file. – heero Sep 26 '18 at 08:24
  • @heero you will have to provide an example of the resulting HTML generated by the PHP. You can try jsfiddle or phpfiddle or sqlfiddle too. the error you see is basically saying that something is not loading properly at that time and `_grid` does not exist when it runs. – Twisty Sep 26 '18 at 15:32
  • @heero I am facing the same problem. Were you able to find the solution? – rajesh Nov 30 '18 at 07:52

0 Answers0