setData: false seems to break Firefox altogetherI'm working on an isolated example to illustrate these two problems, but I just wanted to open the issue before I sleep so I don't forget. Will post the example tomorrow
Repository showing the problem here
http://jsbin.com/hofene/1/edit?html,js,output
@jmeas Examples?
Here you go @rubaxa.
@jmeas FireFox browser or OS? Version?
Firefox v34.0.5, OSX 10.10
http://jsbin.com/hofene/1/edit?html,js,output
And why did you do it? ;]
Apparently, this is "feature" FF.
@RubaXa, I know that Sortable works without the option set. Again, it's only with the option that the problem comes in.
setData is necessary if your dragged items contain text fields. If you drag on top of a text field, then the HTML of what you are dragging gets appended to that field. That is undesirable in some situations (like if you have n text fields that you wish the user to be able to resort).
Apparently, this is "feature" FF.
Do you have a source for this info?
A solution to this fix would be disabling all text fields when dragging, but this isn't as ideal as turning off the setting of data.
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations#dragstart
However, only the drag data is required;
setData is necessary if your dragged items contain text fields. If you drag on top of a text field, then the HTML of what you are dragging gets appended to that field. That is undesirable in some situations (like if you have n text fields that you wish the user to be able to resort).
Please create an example on jsbin.com like this
Was this fixed? :open_mouth:
I don't know if its the same issue, but if i just set the setData property with a function that does nothing, it stops working on firefox. Is this an expected behaviour?
http://jsbin.com/qofekivina/1/edit?html,js,output
@trampos @RubaXa
I also face the same problem. When I add the setData property, It works fine on Chrome/Safari while it break down on Firefox.
Just like @trampos, Firefox failed even if I provide an empty function.
I found a workaround solution to work on Firefox normally.
If setData function add the code dataTransfer.setData('Text', dragEl.textContent) inside
Then, it works (although I don't know why ....)
jsfiddle
If this is a feature, maybe it should be written on README.md
(e.g., you should always providedataTransfer.setData in function)
Or if it is an issue, maybe it can be fixed in the future?
--
MAC OX 10.11 (Firefox 55.0.3 & Chrome 61.0)
Most helpful comment
I don't know if its the same issue, but if i just set the setData property with a function that does nothing, it stops working on firefox. Is this an expected behaviour?
http://jsbin.com/qofekivina/1/edit?html,js,output