Browse Source

Prevent redirect to blank after drag and drop (FF) (#2871)

Fix proposal for issue #2842

More details here : #2842
dependencies
guvial 7 years ago
committed by yotamberk
parent
commit
4f97bc871c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/timeline/Core.js

+ 3
- 0
lib/timeline/Core.js View File

@ -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"))

Loading…
Cancel
Save