You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/12/22 21:49:17 UTC

[royale-asjs] branch develop updated: Fix for navigateToURL with POST params

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 724b81f  Fix for navigateToURL with POST params
724b81f is described below

commit 724b81fd23990b480abf1ab342760e73ff5b9474
Author: greg-dove <gr...@gmail.com>
AuthorDate: Wed Dec 23 10:48:54 2020 +1300

    Fix for navigateToURL with POST params
---
 .../Network/src/main/royale/org/apache/royale/net/navigateToURL.as      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/navigateToURL.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/navigateToURL.as
index 6bbba28..2fc3d34 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/navigateToURL.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/navigateToURL.as
@@ -69,6 +69,8 @@ package org.apache.royale.net
         var windowTarget:Window = window.open(needsPostSupport? "" : url, windowName);
         if (!windowTarget) throw new Error('navigateToURL requires interaction trigger');
         if (needsPostSupport) {
+            //something like this seems to be necessary. Tested on Chrome:
+            windowName = windowTarget['name'] = 'window_'+(Math.round((Math.random()* 100000))).toString(16);
             var submittedForm:HTMLFormElement = doPostForm(url, windowName, request.data, request.contentType, request.method);
             if (!submittedForm) {
                 throw new Error('unsupported contentType in navigateToURL', request.contentType);