Ticket #7658 (closed task: fixed)

Opened 23 months ago

Last modified 18 months ago

IE8: support changes to setting opacity

Reported by: elazutkin Owned by: elazutkin
Priority: highest Milestone: 1.3
Component: DojoX GFX Version: 1.2beta
Severity: normal Keywords:
Cc:

Description (last modified by bill) (diff)

From Jayant Sai:

Regarding Opacity in IE8. Looks like the IE team just changed the syntax a little (http://blogs.msdn.com/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx)

#transparentDiv {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; --IE8
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);   --IE6+7
opacity: .5; --EVERYONE ELSE!
}

Note the quotes and the prefix.

Regarding VML IE8:

if(!document.documentMode || document.documentMode<8) {
  document.createStyleSheet().addRule('v\\:*', "behavior: url(#default#VML);");
}

if(document.documentMode && document.documentMode>=8) {
  document.writeln('<?import namespace="v" implementation="#default#VML" ?>');
}

Change History

Changed 23 months ago by elazutkin

  • status changed from new to assigned
  • component changed from DojoX GFX to Core
  • description modified (diff)

This ticket covers two things in the core:

  • Opacity settings.
  • VML support.

Changed 23 months ago by elazutkin

  • summary changed from gfx: support for IE8 changes to Support for IE8 changes

Changed 21 months ago by doughays

None of the opacity styles in IE8 seem to work with strict DOCTYPE

Changed 21 months ago by cgriego

There's a better solution to this. The problem is that IE8 no longer supports v\:* as a CSS selector, which is just another way of doing the <?import ?>, but you can also achieve the same thing by passing the behavior to import as a third parameter to document.namespaces.add in hostenv_browser.js, that will work across all versions of IE.

Before:

try{
	document.namespaces.add("v","urn:schemas-microsoft-com:vml");
	document.createStyleSheet().addRule("v\\:*", "behavior:url(#default#VML)");
}catch(e){}

After:

try{
	document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML");
}catch(e){}

Changed 21 months ago by bill

  • type changed from enhancement to task
  • summary changed from Support for IE8 changes to IE8: support changes to setting opacity
  • component changed from Core to General
  • description modified (diff)
  • milestone changed from future to 1.3

You need to use quotes for the -ms-filter (for IE8 in strict DOCTYPE mode). I just fixed the example in the description.

See also http://www.quirksmode.org/css/opacity.html

Changed 21 months ago by bill

We've had a number of checkins for this (on the HTML side). I think this ticket is finished except for VML.

Changed 19 months ago by elazutkin

  • priority changed from normal to highest
  • component changed from General to DojoX GFX

Reclassifying this ticket as DojoX GFX one to implement VML-related changes.

Changed 18 months ago by elazutkin

  • status changed from assigned to closed
  • resolution set to fixed

Changed 18 months ago by bill

(In [16479]) Apparently IE8 has decided to support filter: just like IE6 and IE7, so no need for the -ms-filter clauses, which are actually interfering when IE8 is in IE7 compatibility mode.

Fixes #8470, refs #7658.

Note that DojoX dialog's underlay now works (refs #8090) but it still has other issues, namely that the dialog contents are hidden (ie, the dialog is all white)

Note: See TracTickets for help on using tickets.