Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE9 opacity issue #38

Closed
GoogleCodeExporter opened this issue Sep 29, 2015 · 7 comments
Closed

IE9 opacity issue #38

GoogleCodeExporter opened this issue Sep 29, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

Demo link or sample code:

Under InfoBox.prototype.setBoxStyle_, when this line is run under IE9:

___________
if (typeof this.div_.style.opacity !== "undefined") {
  this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")";
}
___________

it will set the opacity to zero and the infobox will not display.  

I was able to "correct" this by adding:

___________
&& navigator.appVersion != "5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; 
x64; Trident/5.0)"
___________

to the if statement in question.

Version: 1.0 and 1.1

Browser / Operating System:
Win 7 IE9 64 bit



Original issue reported on code.google.com by Vryx.Aer...@gmail.com on 27 Sep 2010 at 8:10

@GoogleCodeExporter
Copy link
Author

I don't have access to MSIE 9, so please help me out here. Does MSIE now honor 
the standard CSS opacity parameter and choke on the old filter parameter?

If so, that's likely to break a lot of software.

Before fixing I'd like to understand more about what's really causing the 
problem.

Original comment by garylitt...@gmail.com on 7 Dec 2010 at 9:35

  • Changed state: Acknowledged

@GoogleCodeExporter
Copy link
Author

The InfoBox code always sets opacity and filter.

According to a comment I found on a MS blog -- "IE9’s standard mode supports 
only opacity and not the alpha filter."

Therefore, I would expect MSIE 9 to accept the opacity setting and ignore the 
filter setting... and everything should work as expected.

Does anyone have any insight into this issue?

Original comment by garylitt...@gmail.com on 7 Dec 2010 at 10:15

@GoogleCodeExporter
Copy link
Author

It looks like it is not ignoring the filter setting, so if there is no opacity 
set in css the calculation is setting the filter to 0, and uses that value.  (I 
didn't test to see what happens if opacity and filter are set to different 
values, that might be worthwhile also...)

I hope this illustrates it better:

attachments:
step1 - IE9 mode before the if statement
step2 - IE9 mode after the if
step1ie8 - IE8 mode
works - IE9 mode with opacity set before the filter calculation 

Original comment by Vryx.Aer...@gmail.com on 8 Dec 2010 at 3:13

Attachments:

@GoogleCodeExporter
Copy link
Author

Do me a favor and change the lines in question to this and tell me if it makes 
a difference:

    if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") {

      this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")";
    }

I've added a test to check if opacity is "" (on older versions of MSIE opacity 
is undefined if it hasn't been explicitly set; with MSIE 9 it seems to be "" 
when not explicitly set, just as with other browsers). If it is, I don't set 
filter.


Gary

Original comment by garylitt...@gmail.com on 8 Dec 2010 at 6:39

@GoogleCodeExporter
Copy link
Author

That fixed the issue.

Original comment by Vryx.Aer...@gmail.com on 8 Dec 2010 at 10:03

@GoogleCodeExporter
Copy link
Author

Great news. I've updated the "trunk" version of InfoBox to incorporate this 
change. I will tag it as 1.1.1 in a couple of days.

Thanks for the help. This also affected KeyDragZoom and MarkerWithLabel.

Original comment by garylitt...@gmail.com on 8 Dec 2010 at 10:41

  • Changed state: FixedNotReleased

@GoogleCodeExporter
Copy link
Author

Fixed in InfoBox 1.1.1 tagged release.

Original comment by garylitt...@gmail.com on 9 Dec 2010 at 5:54

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant