Opened 10 years ago

Closed 10 years ago

#8508 closed defect (fixed)

[patch] [cla] IE8: error when pressing "New Message" in mail demo

Reported by: Adam Peller Owned by: Douglas Hays
Priority: high Milestone: 1.3
Component: Editor Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:

Description

load demos/mail/demo.html press 'new message' you'll see an error in RichText? open(), line 426 when trying to access ifr.contentWindow

                       }else{ // blissful sanity!
                               h = dojo.connect(dojo.isIE ? ifr.contentWindow : ifr, "onload", loadFunc);
                       }

If I skip by that in the debugger, then the editor appears and works fine.

Attachments (1)

8508.patch (4.6 KB) - added by Douglas Hays 10 years ago.
Possible fix - needs careful review and https testing

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by Douglas Hays

Component: DijitEditor
Owner: set to liucougar

This appears to be a serious Editor restriction with IE8 which seems to have marked contentWindow as protected and won't allow the load/reload code in open() to work as designed. I suggest a single load with an onload event handler instead of the reload followed by a setTimeout loop that's currently in place. Hopefully someone can remember if there's anything wrong with this approach. Skipping that connect altogether causes loadFunc/onLoad to not be called and that will have a lot of side-effects.

comment:2 Changed 10 years ago by bill

Summary: IE8: error when pressing "New Message" in mail demo[patch] [cla] IE8: error when pressing "New Message" in mail demo

This goes back to #7097 where I added a few setTimeout()'s into the initialization to fix some race conditions. Unfortunately I don't remember the exact case where it was failing. It may well have been timing related, like that it worked locally but not when running from sandbox.dojotoolkit.org.

It would be great to simplify that code if possible, as per your patch. (I haven't tried it yet.) We just need to check that the race condition doesn't appear even when server and client are separate machines.

comment:3 Changed 10 years ago by bill

Oops, my comment above seems unrelated. My change (in [14499]) was for _drawIframe(), which, despite the incorrect comment in the code, is only used by firefox.

Your change is to open().

Changed 10 years ago by Douglas Hays

Attachment: 8508.patch added

Possible fix - needs careful review and https testing

comment:4 Changed 10 years ago by Douglas Hays

Milestone: tbd1.3
Owner: changed from liucougar to Douglas Hays
Status: newassigned

comment:5 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

[16560] Fixes #8508, #7268. For !FF, set the Editor's iframe content using the javascript protocol so that we don't have to reload and don't have to access the iframe's contentWindow.

Note: See TracTickets for help on using tickets.