mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-05 18:26:56 +00:00
check if dataTransfer is undefined (#3093)
this prevents an error when dragging elements not by mouse where dataTransfer can be undefined
This commit is contained in:
parent
ff6aa0570f
commit
42660b05a7
@ -32,6 +32,9 @@ exports.makeDraggable = function(options) {
|
||||
// Add event handlers
|
||||
$tw.utils.addEventListeners(domNode,[
|
||||
{name: "dragstart", handlerFunction: function(event) {
|
||||
if(event.dataTransfer === undefined) {
|
||||
return false;
|
||||
}
|
||||
// Collect the tiddlers being dragged
|
||||
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
|
||||
dragFilter = options.dragFilterFn && options.dragFilterFn(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user