Hi Marcel,
my fault was, some time ago, trying to call window.open within a
qx.event.Timer.once, which lead the window.open call being classified as
a popup by Firefox, because it was decoupled from the user click. Of
course some browsers detected this as a bad behaviour, some not. I think
it worked with Chrome but not with Firefox.
As John said window.open has to be a direct result of a user action like
a mouse click.
Regards
Dietrich
Am 04.12.2015 um 14:36 schrieb John Spackman:
Hi Marcel
If you want to suppress the popup blocker warning then the trick is to
make sure that the window.open() happens as a direct result of the
users click event – I’ve got this in one of my apps and it works fine
on Firefox for a PDF download (the PDF opens in another tab, without a
popup blocker warning):
var btn = new qx.ui.form.Button("Download").set({ allowGrowY: false });
this._add(btn);
btn.addListener("execute", this.__onDownload, this);
//...snip ...
__onDownload: function(evt) {
var src = // get the absolute URL here
window.open(src, "_blank");
}
The user can then save the PDF.
Regards
John
From: Marcel Ruff <m...@marcelruff.info <mailto:m...@marcelruff.info>>
Reply-To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net
<mailto:qooxdoo-devel@lists.sourceforge.net>>
Date: Friday, 4 December 2015 at 11:27
To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net
<mailto:qooxdoo-devel@lists.sourceforge.net>>
Subject: [qooxdoo-devel] Download PDF from inside qooxdoo desktop
Hi,
how do I best download a PDF from inside a qooxdoo desktop application?
If I use window target the popup blocker of firefox reacts.
How is it possible that inside my qooxdoo application the firefox
download dialog opens
to save the pdf?
Thank you
Marcel
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK Give your
users amazing mobile app experiences with Intel(R) XDK. Use one
codebase in this all-in-one HTML5 development environment. Design,
debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140_______________________________________________
qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net
<mailto:qooxdoo-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel