Sortable: Firefox "The address isn't valid" when sorting inside iframe

Created on 8 Jul 2015  路  5Comments  路  Source: SortableJS/Sortable

demo: http://plnkr.co/edit/lBBvUkVBOOgrFfqQ9Haw?p=preview

I get "The address isn't valid" error whenever I try to sort/drag sortables inside an iframe but it works well in chrome.

Most helpful comment

this is still an issue :/

All 5 comments

happens with firefox 40.0.3 on OSX as well

Same stuff, firefox 42.0. Btw there are no errors if draggable contains only image without any text.

To fix it change lines 204-206 from

setData: function (dataTransfer, dragEl) {
    dataTransfer.setData('Text', dragEl.textContent);
},

to

setData: function (dataTransfer, dragEl) {
    dataTransfer.setData('text/html', dragEl.innerHTML);
},

That will cause exception in IE, but no more redirects in FF

Super! Thank you for the fix.

this is still an issue :/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rakeshrockb picture rakeshrockb  路  3Comments

binitghetiya picture binitghetiya  路  4Comments

benfoster picture benfoster  路  3Comments

dwburdick picture dwburdick  路  3Comments

kaermomo picture kaermomo  路  3Comments