You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2016/07/05 21:53:10 UTC
[jira] [Commented] (WICKET-6197) Some JavaScript not executed on
Firefox and multipart Forms
[ https://issues.apache.org/jira/browse/WICKET-6197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363327#comment-15363327 ]
Sven Meier commented on WICKET-6197:
------------------------------------
You can use the following as a workaround:
{code}
target.appendJavaScript("setTimeout(function() { window.print(); }, 0);");
{code}
> Some JavaScript not executed on Firefox and multipart Forms
> -----------------------------------------------------------
>
> Key: WICKET-6197
> URL: https://issues.apache.org/jira/browse/WICKET-6197
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 7.3.0
> Environment: Windows 7 x64, Firefox Developer Edition 49.0.a2 but also on firefox Stable 47, verified on 3 different PCs (my Win7, two Win 10)
> Reporter: Robert Niestroj
> Attachments: IMG_05072016_162356.png, qs.zip
>
>
> When i have a multipart Form and an AjaxSubmitLink where i want to open the the browsers print dialog it is not working.
> protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
> super.onSubmit(target, form);
> target.appendJavaScript("window.print();");
> }
> However alert(1); is working.
> When i remove setMultiPart(true) from the form it is working so i has something to do with it. It might be the dot.
> it is not working under Firefox, it works under Chrome.
> When i click my print button a few times in quick succession firefox shows a dialog "Prevent this page from creating additional dialogs" - see screenshot.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)