Hello,
Thanks for your great work. I am using the timeline lib and it is amazing !
I have found a bug when using drag and drop in FireFox to create a new item in the timeline with FireFox. Chrome, Safari and IE do not seem to suffer from this issue.
After dropping a new item on the timeline, FireFox redirect the user to a blank page.
I could reproduce the issue using your example page : http://visjs.org/examples/timeline/other/drag&drop.html
After having searched a little bit on the net, I found a solution I want to share with you.
I have modified the code of the timeline/component/Core.js. I have changed the function "handleDrop(event)" like that and it fixed my issue :
function handleDrop(event) {
// FIX drop redirect in FIREFOX : START
if(event.preventDefault) { event.preventDefault(); }
if(event.stopPropagation) { event.stopPropagation(); }
// FIX drop redirect in FIREFOX : END
// return when dropping non-vis items
try {
var itemData = JSON.parse(event.dataTransfer.getData("text"))
if (!itemData.content) return
} catch (err) {
return false;
}
itemAddedToTimeline = false;
event.center = {
x: event.clientX,
y: event.clientY
}
me.itemSet._onAddItem(event);
return false;
}
As I am not an expert, I am not sure that is the best way to solve the issue. I would be interested to get your feedback on it. It could help someone else facing the same issue to find a workaround and perhaps help you to integrate this fix in the next release.
Thanks again for your great work.
Guillaume