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

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

Closed
exaptis opened this issue Jan 21, 2013 · 8 comments
Closed

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

exaptis opened this issue Jan 21, 2013 · 8 comments
Assignees

Comments

@exaptis
Copy link
Contributor

exaptis commented Jan 21, 2013

Hi,

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.

Cheers,
David

@JamesMGreene
Copy link
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?

@exaptis
Copy link
Contributor Author

exaptis commented Jan 22, 2013

@JamesMGreene
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

@pkbarbiedoll
Copy link

See also:
#73 (not the same RC, but similar result)
and
https://bugzilla.mozilla.org/show_bug.cgi?id=829557 (confirmed freezing in FF18+)

@Mikieos
Copy link

Mikieos commented Feb 1, 2013

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

@pkbarbiedoll
Copy link

Be sure to subscribe to the bug ticket opened on Mozilla for this issue, if
interested. There has been a fair amount of activity on it in the last
week or two.
https://bugzilla.mozilla.org/show_bug.cgi?id=829557

On Fri, Feb 1, 2013 at 11:27 AM, Rython notifications@github.com wrote:

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
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


Reply to this email directly or view it on GitHubhttps://github.com//issues/85#issuecomment-13001445.

exaptis pushed a commit to exaptis/ZeroClipboard that referenced this issue Feb 26, 2013
…t datarequested) in order to prevent browser blocking
@JamesMGreene
Copy link
Member

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

@JamesMGreene
Copy link
Member

@exaptis Could you please retest this in FF20+?

@JamesMGreene
Copy link
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!

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

No branches or pull requests

4 participants