Opened 3 months ago

Last modified 3 months ago

#15406 new bug

Uncaught TypeError: Converting circular structure to JSON

Reported by: kesavanpos Owned by:
Priority: major Milestone: none
Component: ui.sortable Version: 1.12.1
Keywords: Cc: kesavanpos
Blocked by: Blocking:

Description (last modified by Ryan J Ollos)

While consuming jquery 3.6.0 with jquery-ui-1.12.1.

We are using jquery.ui for sortable feature and we have drag drop feature for widgets. After performing drag operation.

In stop event while stringifying current item JSON.stringify($(this).data().uiSortable.currentItem)

Getting below error:

VM400:1 Uncaught TypeError: Converting circular structure to JSON
    --> starting at object with constructor '$.<computed>.<computed>'
    |     property 'element' -> object with constructor 'jQuery.fn.init'
    |     property '0' -> object with constructor 'HTMLUListElement'
    |     property 'jQuery360090081558503569452' -> object with constructor 'Object'
    --- property 'uiSortable' closes the circle

Change History (3)

comment:1 Changed 3 months ago by kesavanpos

Cc: kesavanpos added
Priority: minormajor

comment:2 Changed 3 months ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 3 months ago by kesavanpos

Please find below js fiddle to reproduce above issue

https://jsfiddle.net/34tbq5jL/3/

Note: See TracTickets for help on using tickets.