Closed juhamust closed 11 years ago
That sounds like a bug. Will check.
I'll try to provide a script for reproducing the issue.
Managed to get same/similar issue only with using jQuery + jQuery UI. Thus, the root cause may also be in jQuery version (1.4.3 in this case)
Thanks, that would be awesome! hmm...this might actually be related to http://stackoverflow.com/questions/9039463/split-string-into-array-with-javascript-in-ie8
The outcome depends on jQuery version:
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>
<!--script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script-->
<script type="text/javascript" src="transparency-master.js"></script>
<title></title>
</head>
<body id="body">
<div id="output"></div>
<script type="text/javascript">
$(document).ready(function(){
Transparency.register($);
var output = $.inArray(2, [1,2,3]) !== -1 ? 'works' : 'broken';
Transparency.render(document.getElementById('body'), {output: output});
});
</script>
</body>
</html>
With IE8 (or IE9 in IE8 mode):
Wow. Thanks, that's a great catch. There's at least two ways to fix this. Either document that jQuery 1.7.2 is or newer is required, or copy the working solution from the jQuery to transparency.js.
Do you need to support jQuery 1.4.x?
If not, I'd prefer the former in order to keep things simple. Ultimately I'm planning to drop oldIE support altogether as soon as IE8 usage drops to marginal.
I'm using Transparency with Trac 0.12, that comes with jQuery 1.4.4 - but upgrading jQuery seems doable.
Btw. I did not check the compatibility with other jQuery releases than 1.7.2. Therefore, it may work just fine with 1.5.x or 1.6.x (http://en.wikipedia.org/wiki/JQuery#Release_history). It just happens, Trac 1.0 comes with 1.7.2 :)
Thanks for extensive investigation. I finally fixed the issue (no more $.isArray dependency): https://github.com/leonidas/transparency/blob/v0.7.10/src/transparency.coffee#L271
Not sure about the validity of this, but IE8 gives a Out of Stack space error (because of getting into recursive loop) from following:
Where
obj
is string "on" andthis
is:With IE9, FF and Chrome, the issue cannot be reproduced.