Opened 12 years ago

Closed 9 years ago

#11324 closed defect (wontfix) First request does not work in Opera.

Reported by: palko Owned by: Bryan Forbes
Priority: high Milestone: tbd
Component: IO Version: 1.4.3
Keywords: Cc:
Blocked By: Blocking:


To recreate the bug, only simple HTML/JS is needed:

<form action="responseWithTextarea.html" method="post" enctype="multipart/form-data" id="imageForm">
    <input type="file" name="image" />
    <input type="button" onclick="submitImage()" value="Submit" />

<script type="text/javascript">
    function submitImage() {{
            "form": dojo.byId("imageForm"),
            "load": function() {
                // E.g. show the uploaded image
            "error": function(error) {

This works in IE 8.0.6001, FF 3.6.3, Chrome 5.0.375.70. However in Opera 10.53, I get for the first request error:

TypeError: Cannot convert 'ifd.getElementsByTagName("textarea")[0]' to object

After the first failure next requests work! I was able to workaround this problem by preparing the underlaying transport IFRAME manually before the first call.

Workaround function was:

 * Prepare underlaying IFRAME transport.
 * Workaround for Opera's delayed DOM handling.
_prepareTransport: function() {
    var dif =;
    if (!dif._frame) {
        dif._frame = dif.create(dif._iframeName, dojo._scopeName +

I am assuming that the problem is, that Opera is somehow delaying _creating_ the IFRAME element, so that it is not ready when the first request is finished.

I think the solution can be to first prepare the transport IFRAME and delay the first request when is called. The delay can be achieved with something small like this:

setTimeout(dojo.hitch(this, "_fireNextRequest"), 1);

Change History (3)

comment:1 Changed 12 years ago by palko

I was playing with this a little bit more:

IFRAME in Opera fires two 'onload' events. The first 'onload' belongs to the 'blank.html', which is the source page the IFRAME is created with.

Problem is, that when 'onload' is handled by, there is an ongoing request and the handler is assuming that the 'onload' event must belong to the request.

Can someone please confirm this and write if it will be fixed. And will the fix be backported to 1.4.X? Thank you.

comment:2 Changed 10 years ago by bill

Owner: changed from James Burke to Bryan Forbes

Bulk change to reassign IO tickets to Bryan, since he is working on new dojo/request module. Some of these tickets should probably be closed as already fixed, invalid, or wontfix.

comment:3 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

Given that Opera is being rebuilt based on WebKit?, we should probably close this as wontfix.

Note: See TracTickets for help on using tickets.