Firefox freezes when alert() is used inside on complete callback #85

exaptis opened this Issue Jan 21, 2013 · 8 comments


None yet

4 participants



today I implemented your latest Version (1.17 and 1.16) and experienced problems with Firefox 18.0 & 18.0.1 freezing inside the on-complete function. After some debugging it turned out, that flash is waiting for the on-complete function call to end but for whatever reason the alert is not shown and blocks the whole browser. Wrapping the alert call into an anonymous function and executing it via setTimeout solved the problem.

clip.on( 'complete', function(client, args) {
   setTimeout(function() {
     alert("Copied text to clipboard: " + args.text );
   }), 10);

If you want I can setup a demo-page if you can't reproduce it.


ZeroClipboard member

@exaptis: Can you repro it in Firefox 17- or any other browser? Also, what OS are you running and what is your FlashPlayer version?

@jonrohan: Regardless, I was already thinking we should probably make all of these events asynchronous unless they need to be synchronous, e.g. dataRequested. Offhand, I think that dataRequested is the only event that will need to be synchronous because we need it to maintain the "user interactive" state in order for Flash to keep its temporarily escalated permissions to inject into the clipboard. Perhaps, for the other events, we could consider adding a trailing parameter to the on/off methods to request synchronous flow... but I think it would probably be a lot simpler implementation-wise to just make the events async wholesale with a singular exception for dataRequested. Thoughts?


sorry, it was quite late yesterday. No I coudn't reproduce this behaviour with any other browser / combination. Our QA department has been checking it's functionality over the last half year on mac & windows with safari, chrome, firefox and ie. It stopped working with ff18.

Problem first discovered on Win7 SP1 with Flash 11,4,402,278 & 11.5.502.110 and Firefox 18.0 & 18.0.1


See also:
#73 (not the same RC, but similar result)
and (confirmed freezing in FF18+)


I've experienced the same problem since upgrading to Firefox 18.0.1. Its quite strange, with the alert in either the mousedown event or complete event Firefox freezes until I click on a different application, after which it responds as expected. Removing the alert fixes the problem.

I'm running Win7 SP1 / Flash 11.5.502.146 / Firefox 18.0.1

@exaptis exaptis added a commit to exaptis/ZeroClipboard that referenced this issue Feb 26, 2013
@exaptis exaptis #85 - make event callback by default asynchronous (except datarequest…
…ed) in order to prevent browser blocking
ZeroClipboard member

FYI: Looks like this is fixed in Firefox 20 (the next release), which should be released on 2013-04-01.

ZeroClipboard member

@exaptis Could you please retest this in FF20+?

ZeroClipboard member

@exaptis: This should be fixed in FF20+, so I'm going to close this bug. If you are still running into this problem, please reopen this issue. Thanks!

@JamesMGreene JamesMGreene was assigned May 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment