-
Notifications
You must be signed in to change notification settings - Fork 520
Error on visit() #448
Comments
+1 Seems related to jQuery's CSS based effects. Zombie.js fails running jquery's fadeIn() effect with the error:
|
I'm also sometimes getting this:
jQuery 1.7.2, traceback points to this line. Will try with a newer jquery. EDIT: |
Same issue here with zombie 1.4.1 and jQuery 1.7.2 (which I am tied to unfortunately) I do not get the error when using zombie 1.3.1 |
I've got this with jquery 1.8.3 and colorbox:
|
The issue appears to have to do with the following in jQuery (~LL6652-6680 in jQuery 1.7.1) set: function( elem, value ) {
var style = elem.style,
currentStyle = elem.currentStyle,
opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
filter = currentStyle && currentStyle.filter || style.filter || "";
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
style.zoom = 1;
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
// if "filter:" is present at all, clearType is disabled, we want to avoid this
// style.removeAttribute is IE Only, but so apparently is this code path...
style.removeAttribute( "filter" );
// if there there is no filter style applied in a css rule, we are done
if ( currentStyle && !currentStyle.filter ) {
return;
}
}
// otherwise, set new filter values
style.filter = ralpha.test( filter ) ?
filter.replace( ralpha, opacity ) :
filter + " " + opacity;
} jQuery tests if opacity is supported by creating some html and doing: opacity: /^0.55/.test( a.style.opacity ), For reasons unknown, zombie does not support At some point later, jQuery gets smarter about this and checks for the function // in earlier
if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
// in 1.9.1
if ( ( value >= 1 || value === "" ) &&
jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
style.removeAttribute ) { Net of it is, the problem is a mismatch between jQuery and zombie. Easily fixed by using jQuery 1.9.1 or later... "easily" if you can easily switch. The problem is actually from jsdom, see jsdom/jsdom#425 How to fix it... |
https://github.com/assaf/zombie/blob/master/src/zombie/jsdom_patches.coffee#L49-L58 On Wednesday, May 1, 2013 at 10:22 PM, Avi Deitcher wrote:
|
OK, so why does the bug still exist? I can easily replicate it, and my version of zombie has that patch. 2.0.0-alpha11 |
That's weird. I just posted that last commented, no clue who asas22 is! |
That's a disturbing Github bug. |
This still occurs. Made ZombieJS unusable for me. |
I know the test script isn't very helpful, and it is due to something the page is loading, but I can't dump the contents of the page to a forum like this. Where should i start with debugging/troubleshooting? Or any ideas of what could cause the issue? I am thinking it might have to do with jquery, still running that down now.
The text was updated successfully, but these errors were encountered: