After calling remove_all_widgets, then adding more widgets, I can't drag a widget where an old widget once was.
See original GitHub issueAfter calling remove_all_widgets(), then adding more widgets, I can’t drag a widget where an old widget once was.
For example, if I create a grid with 2 rows and 3 columns like so:
+-----+-----+----+
| 1 | 2 | 3 |
+-----+-----+----+
| 4 | 5 | 6 |
+-----+-----+----+
Then call remove_all_widgets(), then recreate the same grid as above, I can’t drag any widget onto another widget without getting the below errors (multiple times):
Uncaught TypeError: Cannot read property ‘row’ of undefined
I can however, move a widget below into, say “the third row”, onto 7, 8, and 9.
Thanks in advance for any help.
Issue Analytics
- State:
- Created 10 years ago
- Comments:16
Top Results From Across the Web
How to add, modify, or remove widgets from Android
Locate the widget you want to modify, and then tap and hold it. You can now either reposition it by dragging and dropping...
Read more >Add widgets on iPhone - Apple Support
Go to the Home Screen page where you want to add the widget, then touch and hold the Home Screen background until the...
Read more >Add or remove apps or widgets on the home screen of your ...
When you're done editing, tap anywhere outside the widget. You can also move the widget by touching and holding it, and then dragging...
Read more >iOS 14: How to add, remove, and customize widgets | Macworld
Once you have picked a widget and its size, tap Add Widget at the bottom of the screen. The Widget you have picked...
Read more >Add apps, shortcuts & widgets to your Home screens
Resize a widget · Touch and hold the widget on your Home screen. · Lift your finger. If the widget can be resized,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sniperwolfpk5 thanks for posting the fix.
$('.gridster ul').empty()
sufficed for me. The following “cleanup routine” seems to work the best:1+ please fix it on the underlying library with @OscarEriksen fix.
If you invoke removeWidget(“#something”); Then right after invoke removeWidget(“#somethingelse”);
Then you try to add_widget(“#something”); You get the same error.
My work around:
Which triggers a jquery event to actually handle things properly instead of the javascript nonsense exception.
and to remove.
Nasty but works.