bgrins / filereader.js

A lightweight wrapper for the JavaScript FileReader interface
http://bgrins.github.com/filereader.js/
MIT License
413 stars 86 forks source link

Paste in Firefox doesn't seems to work #16

Closed LouWii closed 10 years ago

LouWii commented 10 years ago

Hi !

I was trying your project and it seems that the paste function is not working in firefox. I have no problem on Chrome though. Here is the code :

var opts = {
    dragClass: "drag",
    accept: false,

    readAsDefault: 'BinaryString',
    on: {
         loadstart: function(e, file) {
        // Native ProgressEvent
    console.log("begining up");
    },
    loadend: function(e, file) {
        // Native ProgressEvent
    loadImage(
              file,
              function (img) {
                  ctx.drawImage(img, 0, 0);
              },
              {maxWidth: 600} // Options
          );
    }
};

FileReaderJS.setupClipboard(document.body, opts);

This should show me begining up in the console (as Chrome do), but in Firefox with firebug, nothing happends.

bgrins commented 10 years ago

This does not seem to be supported yet in Firefox. I found this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=891247, and added it to the documentation.