Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Only some clicks triggers copy when using with AMD loader #298

Closed
Boldewyn opened this issue Dec 26, 2013 · 4 comments
Closed

Only some clicks triggers copy when using with AMD loader #298

Boldewyn opened this issue Dec 26, 2013 · 4 comments

Comments

@Boldewyn
Copy link

There are several similar issues reported lately. Presumably this is a duplicate. But here is my set-up:

  • Javascript management with require.js, loading ZeroClipboard via AMD
  • Browsers: Newest Firefox, newest Chromium
  • OS: Linux, Ubuntu 13.10
  • Flash: 11.2
  • ZeroClipboard: 1.2.3

Code: I've put together a gist with the minimal testcase I could come up with: https://gist.github.com/Boldewyn/8138833 There's a small description with log output over there.

It looks like some kind of race condition to me: Sometimes, the text gets copied, sometimes not. It's not predictable, as far as I can see.

@JamesMGreene
Copy link
Member

Are you setting the moviePath config option at some point? Your gist doesn't show such but would presumably need it since your JS file is not in the same directory as your page.

This is a minor annoyance I hope to ease in v2.x via #303.

@JamesMGreene
Copy link
Member

Similar to Issue #279 but different in that it doesn't involve a Mac TrackPad.

@Boldewyn: Any chance you are clicking by tapping a TrackPad of some sort rather than using a mouse?

@Boldewyn
Copy link
Author

In my case, I've just copied the ZeroClipboard.swf to the page's location. It gets loaded just fine. (Of course, for the Gist to run out of the box, one would need to do either of those.)

I've seen the problem here on my laptop, so yes, it's actually a Synaptic trackpad. However, it appears regardless of tapping the pad or pressing the pad's left "mouse" button.

@JamesMGreene
Copy link
Member

So I'm guessing that this has to do with my use of the asynchronous form of require rather than the synchronous form. Switching to the synchronous version should hopefully fix the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants