samedi 18 avril 2015

dragstart event gives error: Permission denied to access property "effectAllowed"

I just started to work with meteor (1.1.0.2) and try to implement some drag and drop functionality. Basically what it should do: The user can drag video element from a sidebar to a contenteditable div.


My problem is now that it is not working in firefox (v 37, OSX) but it is working in Chrome.


Here is some Code:





Template.single_video.events(
{
'dragstart video': function(event)
{
var dt = event.originalEvent.dataTransfer;
dt.effectAllowed = "copy";
dt.setData('text/html', e.currentTarget.outerHTML);

return false;
}
})



<template name="single_video">
<div class="col-xs-12">
{{title}}
<video controls="" class="video-drag" draggable="true">
{{#each sources}}
<source src="{{src}}" type="{{type}}">
{{/each}}
</video>
</div>
</template>



I always get the error: Error: Permission denied to access property "effectAllowed"


So my question is: Is it a bug in FF or did I miss something? Thanks in advance for any help.


Aucun commentaire:

Enregistrer un commentaire