Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15940 closed defect (fixed)

[regression] dojo/io/iframe (and maybe others) can fail when form property is used with async: true

Reported by: Kenneth G. Franqueiro Owned by: Bryan Forbes
Priority: undecided Milestone: 1.8.1
Component: IO Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

Something ends up trying to call dojo.byId which can fail in async mode. This can be reproduced with the following simple test code:

<!DOCTYPE html>
<html>
  <body>
    <form id="f" method="post">
      <input name="foo">
    </form>
    <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js" data-dojo-config="async:true"></script>
    <script>
      var test;
      require(["dojo/io/iframe"], function(iframe){
        test = function(){
          iframe.send({
            url: "/test/postTextarea.php",
            form: "f"
          }).then(function(data){
            console.log(data);
          });
        };
      });
    </script>
  </body>
</html>

This does not fail on 1.7.3.

(Ran into this while reproducing #15939 and comparing against dojo/io/iframe.)

Change History (3)

comment:1 Changed 7 years ago by Kenneth G. Franqueiro

Resolution: fixed
Status: newclosed

In [29629]:

dojo.byId -> dom.byId in io/iframe.js; fixes #15940 on 1.8 branch !strict

comment:2 Changed 7 years ago by Kenneth G. Franqueiro

In [29630]:

dojo.byId -> dom.byId in io/iframe.js; fixes #15940 on trunk !strict

comment:3 Changed 7 years ago by Kenneth G. Franqueiro

Milestone: tbd1.8.1
Note: See TracTickets for help on using tickets.