Hi,
Theme view page is blank while turned on production mode with merge and minify js and css. - https://prnt.sc/25xvq1a
Getting error in console:
Uncaught TypeError: Cannot read property 'add' of undefined in ui related js in the below line.
add("draggable","connectToSortable",{start:function(event,ui){
Please check and assist to solve this error.
Hello @devishree,
Greetings!
Try to add a click handler, tell it to append the target to the sortable. Then refresh the select.
$("#sidebar-wrapper").on("click", ".draggable", function(e){ $(".sortableList").append(e.target).sortable('refresh'); });
You can also add and remove relevant classes from target if you don't want it to be draggable anymore.
And $.clone instead of $.append if you don't want to move the original. And change the order a bit:
$(e.target).clone().appendTo(".sortableList");
I hope this will help you to solve your issue.
If not, feel free to contact us.
If solved, Click KUDOS and accept it as a solution.
Thank you!