Hacker News new | ask | show | jobs
by aaronm67 4737 days ago
In Firefox, it seems like you can only catch Clipboarddata on input boxes still

    document.body.addEventListener("paste", function(e){
        console.log("paste event fired") 
    })
In Chrome, this will fire when you paste, in Firefox it will not.
1 comments

It might be restricted to focusable/editable components, e.g. a `contenteditable` block should work.
Yep, you're correct

http://jsbin.com/odupog/1/edit

Either way, should alleviate some of the privacy concerns, as you can only get ClipboardData from elements where "paste" has a visible effect.