fabien-d / alertify.js

JavaScript Alert/Notification System
http://fabien-d.github.com/alertify.js/
4.26k stars 725 forks source link

alertify-cover overlay DIV does not work on IE9. #141

Closed MasNotsram closed 11 years ago

MasNotsram commented 11 years ago

First let me say how fantastic Alertify is. It's such a nice simple replacement for the alert box that actually looks nice. Great idea.

On IE9 on Windows 7, the alertify-cover DIV is generated, but you can still click through it.

The fix is simple enough, I simply added onto the alertify-cover class in the CSS:

.alertify-cover { background-color:white; filter:alpha(opacity=0); opacity:0; }

However, it's probably worth adding this to the code.

Thanks again for the great JS.

fabien-d commented 11 years ago

Thanks for the report/fix. Would you mind opening a PR?

fabien-d commented 11 years ago

Fixed with ^ PR

jheliker commented 10 years ago

I am a new user of Alertify. I love it! Wanted to update the above CSS, as the opacity setting is not cross-browser compatible and won't work for partial opacity. Here is the class I am using, with 65% opacity:

.alertify-cover { position: fixed; z-index: 99999; top: 0; right: 0; bottom: 0; left: 0; background-color: white; /* IE 8 / -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; / IE 5-7 / filter: alpha(opacity=65); / Netscape / -moz-opacity: 0.65; / Safari 1.x / -khtml-opacity: 0.65; / Good browsers */ opacity: 0.65; }

Thanks to friends @ http://css-tricks.com/snippets/css/cross-browser-opacity/ for the browser opacity compatibility information.