Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16429 closed defect (fixed)

[regression] hccss.js causes IE8 Mixed Content Warning

Reported by: curtispd Owned by: bill
Priority: undecided Milestone: 1.8.2
Component: General Version: 1.8.1
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

This is the same issue as http://bugs.dojotoolkit.org/ticket/16013, but it happens in IE8 too (https only).

The fix is to change this line in dojo/hccss.js:

if(has("ie") < 8){

to:

if(has("ie") <= 8){

To include IE8 as well as IE7. This doesn't happen in IE9.

See related: http://bugs.dojotoolkit.org/changeset/14121/dojo

Change History (5)

comment:1 Changed 6 years ago by Randy Hudson

Instead of checking for the IE level, shouldn't this simply be:

domConstruct.destroy(div);

comment:2 in reply to:  1 Changed 6 years ago by bill

Cc: Douglas Hays added
Milestone: tbd1.8.2
Owner: set to bill
Status: newassigned

Replying to randyhudson:

Instead of checking for the IE level, shouldn't this simply be:

domConstruct.destroy(div);

Well, that's an interesting question. You can see on http://bugs.dojotoolkit.org/ticket/16013#comment:1 that domConstruct.destroy() was what originally caused the problem. But then Doug changed how destroy() worked in [30096], so it's likely no longer an issue.

The other approach is to use the element supplied by has.add(), like:

has.add("highcontrast", function(global, doc, element){
    // I didn't create element so I don't need to worry about destroying it.
    ...

The element is created in dojo.js, and incidentally, it's never destroyed, but let's not worry about that for now.

comment:3 Changed 6 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30121]:

minimal fix on 1.8 branch to avoid mixed content warning on IE8, fixes #16429 on 1.8 branch !strict

comment:4 Changed 6 years ago by bill

In [30122]:

minimal fix to avoid mixed content warning on IE8, fixes #16429 on trunk !strict

comment:5 Changed 6 years ago by bill

I checked in the minimal fix. I thought about using the element supplied to the has.add() callback, but it isn't attached to the DOM so getComputedStyle() likely won't work. I'm also not sure if it's kosher to modify that element like the highcontrast test does.

I didn't try using domConstruct.destroy() either. It didn't seem worth it to pull in the dojo/dom-construct module just for that one function. Although it's surely getting pulled in somewhere else, so it doesn't really matter.

Note: See TracTickets for help on using tickets.