layerssss / paste.js

read image/text data from clipboard (cross-browser)
http://layerssss.github.io/paste.js/
MIT License
463 stars 94 forks source link

Prevent event from second time #54

Closed SatoshiKawabata closed 7 years ago

SatoshiKawabata commented 7 years ago

I use pastableNonInputable element.

When I paste text, I can't paste it from second time. By this code, ev.currentTarget is not equal to ev.target. ev.currentTarget is the parent element but ev.target is the child span.

Do you know some workaround? Or do I mistook usage?

SatoshiKawabata commented 7 years ago

How about this change? I tryed to remove the evaluation. https://github.com/SatoshiKawabata/paste.js/pull/1/files

layerssss commented 7 years ago

Hi, I tried to paste multiple times in Edge (assuming you're developing on Edge). And I can paste multiple times without problems.

Please try to remove other code manipulating the textarea then try implement the pasting feature again. If it's still not working please show me how do you think you can't paste text for the second time. (browser version / code).

The statement you are trying to remove is part of the hack for old version firefox. Without it the text pasting would be quirky.