From 4f97bc871c7803f5ab182f761715d0c876570842 Mon Sep 17 00:00:00 2001 From: guvial Date: Sat, 18 Mar 2017 13:25:52 +0100 Subject: [PATCH] Prevent redirect to blank after drag and drop (FF) (#2871) Fix proposal for issue #2842 More details here : #2842 --- lib/timeline/Core.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 01bf3993..8fbf0e97 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -245,6 +245,9 @@ Core.prototype._create = function (container) { } function handleDrop(event) { + // prevent redirect to blank page - Firefox + if(event.preventDefault) { event.preventDefault(); } + if(event.stopPropagation) { event.stopPropagation(); } // return when dropping non-vis items try { var itemData = JSON.parse(event.dataTransfer.getData("text"))