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

I just started working with Meteorite (1.1.0.2) and tried to implement some drag and drop functionality. Basically what it has to do is: the user can drag and drop the video element from the sidebar into the content div.

My problem is it doesn't work in firefox (v 37, OSX), but it does work in Chrome.

Here is the code:

Template.single_video.events(
{
  'dragstart video': function(event)
  {
	var dt =  event.originalEvent.dataTransfer;
    dt.effectAllowed = "copy";
	dt.setData('text/html', event.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>
      

Run codeHide result


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

So my question is, is this a bug in FF or am I missing something? Thanks in advance for any help.

+3


source to share





All Articles