Drag and drop text from iframe to input
Hi everyone!
I want to drag text from an iframe that contains an application/pdf visualization and drop it in an input tag that is in the parent node (tag). It doesn't seem to work knowing that the domaine from which I get the PDF and my page are the same.
When I try to bind the drop event to access the text that is being dragged I get a security error :
SecurityError: The operation is insecure.
here's is my code :
- $('#myInpytTag').bind('drop', function (e)
- var theDroppedText = e.originalEvent.dataTransfer.getData('Text');
- });
When I drag the text to another tab where the same page is loaded, I can then drop the text to the right input, and it works. Very weird right??
Does anyone know why dropping the text in the same page raises the security error as if the iframe loaded it content from a different domaine, While dropping it in another tab where the exact same page is loaded from is not working.
Thanks in advance