keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

IE onload error [solved] #28

Open john-warpdevelopment opened 12 years ago

john-warpdevelopment commented 12 years ago

I was using IE9 compatibility mode to simulate IE7 (issue was also in IE8 document mode) included selectivizr v1.0.3b and on load it would error in the resolveUrl function on the line

if (url.charAt(0) == "/") {
            return getProtocolAndHost(contextUrl) + url;
        }

The error was in the if, the variable url was undefined. So without really knowing what that function does, i seem to have been able to solve the issue by adding this line near the top of the function

if (!url) return "";
john-warpdevelopment commented 12 years ago

I should mention that the when I tried to check for the null in the if statement that my styling on my page was broken , so i suspect it might have something to do with less (http://lesscss.org/) at the time using v1.1.3.

emirotin commented 12 years ago

same here, have to monkey-patch it for now

mlhDevelopment commented 11 years ago

We had a similar issue, though v1.0.3b and pull request 34 fixed it (https://github.com/keithclark/selectivizr/pull/34).