hiroprotagonist / jquery.mobile.actionsheet

An actionsheet for jquerymobile
103 stars 34 forks source link

ie bug+fix #10

Closed forbeshawkins closed 12 years ago

forbeshawkins commented 13 years ago

Hi,

thanks so much for creating this - is exactly what I was looking for.

I was finding a two problems when testing this in IE9. I seem to have found fixes for both which I thought I'd share. Please note that I'm a bit of a js novice so apoligies if I say anything dumb;

Firstly, IE doesn't seem to like function parameters passed to the window.setTimeout callback. I applied afix, which appears to have resolved it - see http://der-design.com/javascripts/cross-browser-settimeout

Secondly, I get null passed in to the event parameter in this.content.animationComplete. I'm guessing that this is due to IE's lack of support for css transitions? Anyway I fixed it like this:

if ($.support.cssTransitions) { this.content.animationComplete(function (event) { $(event.target).removeClass("ui-actionsheet-animateIn"); });

            this.content.addClass("ui-actionsheet-animateIn").show();
        }
        else {
            this.content.fadeIn();
        }

thanks again