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

Unable to paste text in Safari #23

Closed pkaminski closed 8 years ago

pkaminski commented 8 years ago

@puremourning reports that 0.0.11 broke cmd+v text pasting in Safari. I'll integrate 0.0.13 later today to see if that fixes the issue, but thought I'd report it in the meantime.

puremourning commented 8 years ago

Thanks @pkaminski. Yes, cmd+v doesn't work (in reviewable.io) but edit->paste does. Can help with diagnostics if you like. Just point me in the right direction to be useful.

layerssss commented 8 years ago

@pkaminski , Yes, it should be working in 0.0.13. You also need to remove your previous workaround because it's already in paste.js.

pkaminski commented 8 years ago

Reviewable is now updated to 0.0.13, and yeah, I removed the workaround. @puremourning can you try again? Thanks.

pkaminski commented 8 years ago

I had a friend check on Reviewable with paste.js 0.0.13 and he reports that it still doesn't work. cmd+v blurs the textarea and doesn't paste anything in.

layerssss commented 8 years ago

@pkaminski Looks likes I have to add some safe checks to ensure text-pasting isn't broken when paste-detection is not possible for whatever reason. Meanwhile, could you help me collect his environment, since I am unable to reproduced this issue under both FF43 and FF38ESR under GNOME3 and CentOS7

pkaminski commented 8 years ago

This issue is for Safari on OS X. I can get specific version numbers from my friend if you can't repro, but he just tried it on whatever he had installed so I suspect it's pretty widespread. @puremourning can also let us know his system config.

layerssss commented 8 years ago

@pkaminski I pushed a new version 0.0.14. Image-pasting are still not working in Safari, but the focus state of textarea should not be broken anymore. Please update and check.

pkaminski commented 8 years ago

I think you forgot to tag 0.0.14.

layerssss commented 8 years ago

@pkaminski ha, yes, it's tagged now.

pkaminski commented 8 years ago

I integrated 0.0.14, but the results in Safari are... strange. Running reviewable.io in an OS X VM on Sauce Labs, hitting cmd+v will paste anywhere from 0 to 3+ copies of the clipboard (usually 2). Yet when typing normal text I have no problem with repeated characters. Also, when my friend tries it directly on a Mac, he has to hold down cmd+v to get anything to happen at all and estimates that ~5%-10% of the repeated keystrokes actually paste something.

On http://micy.in/paste.js/, my friend's Safari works perfectly, whereas in my VM the pastes are still doubled.

At this point my guess is that there's a race condition somewhere in the paste.js code that Reviewable is somehow exacerbating. Any thoughts / ideas on how to track this down? Thanks.

pkaminski commented 8 years ago

@puremourning, could you try pasting in Reviewable on Safari again to add one more data point? Thanks.

puremourning commented 8 years ago

Of course. Generally - it isn't working. If I hit cmd-v twice really quickly, sometimes I can get it to paste. But rarely. I tried a few tricks like holding down, double/triple hitting it, but it more miss-and-miss than hit-and-miss.

Versions:

pkaminski commented 8 years ago

I disabled the paste.js integration in Safari (and Opera) since it's ineffective in those browsers anyway. @puremourning can you verify that pasting now works normally? Thanks.

This doesn't resolve the real issue but I'm out of ideas on how to track it down.

puremourning commented 8 years ago

@pkaminski confirm that paste now works in safari. Thanks!!!