Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18715 closed defect (fixed)

dijit/Editor on IE11 can't enter text if "Active Scripting" is disabled for the "Internet" zone in IE

Reported by: Andy Owned by: Bill Keese <bill@…>
Priority: undecided Milestone: 1.11
Component: Editor Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

This is the same issue as #16633, but for IE11. For IE9 it was fixed with this condition in dijit/_editor/RichText:

if(has("ie") == 9){
        // On IE9, attach to document before setting the content, to avoid problem w/iframe running in
        // wrong security context, see #16633.
        this.editingArea.appendChild(ifr);
        ifr.src = s;
}else{
        // For other browsers, set src first, especially for IE6/7 where attaching first gives a warning on
        // https:// about "this page contains secure and insecure items, do you want to view both?"
        ifr.setAttribute('src', s);
        this.editingArea.appendChild(ifr);
}

In IE10 this issue does not happen. So when I add IE11 to the condition, it works for me in IE11 with http and https URLs:

if(has("ie") == 9 || has("trident") == 7"){

Change History (7)

comment:1 Changed 4 years ago by dylan

Do you know by chance what happens with Edge?

Wondering if it's better to do a feature test here, though the test for ActiveX objects probably won't suffice, e.g....

if ("ActiveXObject" in window) { }

I'm wondering why IE9 and IE11 need this workaround, but not IE10.

comment:2 Changed 4 years ago by Andy

I have tested the dijit Editor with Edge in this configuration and it works. By the way I found a link that in detail describes this IE problem: https://evolpin.wordpress.com/2011/12/11/internet-explorer-active-scripting-and-innerhtml/

And if I appendChild something other than an iframe this IE bug happens in IE9, IE10 and IE11, but not in Edge.

Last edited 4 years ago by Andy (previous) (diff)

comment:3 Changed 4 years ago by Andy

A feature test could look like this:

var div = document.createElement('div');
div.innerHTML = '<div onclick="this.noBug = true">';
div.childNodes[0].click();
alert('Has IE zone problem: ' + !div.childNodes[0].noBug);

Than we get only true if the IE has the zone bug and the zone configuration is problematic.

comment:4 Changed 4 years ago by bill

andiby, thanks for the link to that article and for the feature test (actually, more like a "bug test"). I'm hesitant to have two separate code paths for IE that are chosen dynamically depending on the whether "Active Scripting" is disabled for the "Internet" zone or not. Actually, ideally we wouldn't have two separate code paths at all, and now that we've desupported IE6 and IE7 (since dojo 1.9), maybe we can use this code path for all browsers:

this.editingArea.appendChild(ifr);
ifr.src = s;

Need to test it out though.

PS: The problem with having two code paths for IE is that only one of them will be tested when I run the regression test, since I only have one configuration of IE11.

Last edited 4 years ago by bill (previous) (diff)

comment:5 Changed 4 years ago by Bill Keese <bill@…>

Owner: set to Bill Keese <bill@…>
Resolution: fixed
Status: newclosed

In d26af75ccb8000a546a57ac247fb604f9a11c05a/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 4 years ago by bill

Milestone: tbd1.11

Just putting this into 1.11 for now because it could be breaking something that wasn't caught by the regression tests.

comment:7 Changed 4 years ago by Bill Keese <bill@…>

In ea34005ded0831966c5be97ca01ea9ec05a1332f/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.