Recently, I got strange issue with showModalDialog and IE 7/8. Actually I want to implement some gradient background for button. For gradient, we need to define CSS property as per browser, so I have set gradient background for major browser like Chrome,Safari,FireFox,Opera and IE.
Have a look my button CSS looks like:
Have a look my button CSS looks like:
.myFancyButton{ background: #2491c6; /* Older browsers */ background: -moz-linear-gradient(top, #7ABCDC 0%, #2491c6 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7ABCDC), color-stop(100%,#2491c6)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #7ABCDC 0%,#2491c6 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #7ABCDC 0%,#2491c6 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, #7ABCDC 0%,#2491c6 100%); /* IE10+ */ background: linear-gradient(top, #7ABCDC 0%,#2491c6 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7ABCDC', endColorstr='#2491c6',GradientType=0 ); /* IE6-9 */ }
All things working fine, but after implementing this CSS to my project I found the strange issue from client that button didn't work with model window. For pop-up window display, I'm using showModalDialog and I identify that button is working only when I click on buttion text value. It's not work if I click inside the button but not on buttion text value. At this time I check same in FireFox and it's working well but in IE7/IE8 I don't know why it's not working. And that is the reason I hate IE.
After some workaround on this and I found that if I'm removing all browser specific CSS property for Chrome,Safari,Opera, it's works well in IE. So, now my buttons CSS looks like:
.myFancyButton{ background: #2491c6; /* Older browsers */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7ABCDC', endColorstr='#2491c6',GradientType=0 ); /* IE6-9 */ }
There are many reasons to hate IE but here I have just mention one. If you have any reason to hate IE, please do comment below......