From 65622495854a95a320d7c95d4bfca347248ccba2 Mon Sep 17 00:00:00 2001 From: dagnelies Date: Thu, 30 Oct 2014 11:27:29 +0100 Subject: [PATCH] Fix for IE : event.dataTransfer.setData IE is a bit picky with dataTransfer.setData and allows only certain kind of format, not 'foo', breaking the whole D&D code. This fixes it. http://msdn.microsoft.com/en-us/library/ie/ms536744%28v=vs.85%29.aspx --- src/Ractive-decorators-sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ractive-decorators-sortable.js b/src/Ractive-decorators-sortable.js index d0e54c4..26f835f 100644 --- a/src/Ractive-decorators-sortable.js +++ b/src/Ractive-decorators-sortable.js @@ -142,7 +142,7 @@ throw new Error( errorMessage ); } - event.dataTransfer.setData( 'foo', true ); // enables dragging in FF. go figure + event.dataTransfer.setData( 'text', 'foobar' ); // enables dragging in FF. go figure // keep a reference to the Ractive instance that 'owns' this data and this element ractive = storage.root; @@ -199,4 +199,4 @@ Ractive.decorators.sortable = sortable; -})); \ No newline at end of file +}));