IE 7 & 8 bug box-shadow Illegal input string in Vector2D #188

Closed
robincafolla opened this Issue Dec 14, 2011 · 4 comments

Comments

Projects
None yet
2 participants

Copied from:
http://css3pie.com/forum/viewtopic.php?f=3&t=1425&p=4723#p4723

I was having an unusual amount of trouble with a box-shadow in ie 7 & 8 and think I've found a bug with negative box-shadow spreads.

Sadly I can't show it to you in the wild but here's my set-up and hopefully you can replicate.

.box {
   position:relative;
   float: left;
   margin-left: -10px;
   width: 620px;
   height: 99px;
   z-index: 20;

   background: #d34a55; /* Old browsers */
   background: linear-gradient(top, #d34a55 0%,#ca013a 100%); /* W3C */
   /*loads of browser specific gradients*/
   -pie-background: linear-gradient(top, #d34a55 0%,#ca013a 100%); /*PIE for css3 in ie 6-9*/

   -moz-box-shadow: 0 4px 2px -2px #574e5a;
   -webkit-box-shadow: 0 4px 2px -2px #574e5a;
   box-shadow: 0 4px 2px -2px #574e5a;

   behavior: url(PIE_uncompressed.htc);
}

I get an error in the IE console:

SCRIPT33426: Arg: Illegal input string in Vector2D
PIE_uncompressed.htc, line 3431 character 25

or in the compressed version

SCRIPT33426: Arg: Illegal input string in Vector2D
PIE.htc, line 76 character 358

which appears to relate to the values being passed to fill['focusposition']

Adding the following at line 3417 of PIE_uncompressed.htc fixes the problem, but I can't guarantee the behaviour remains unchanged.

   totalW = (isFinite(totalW) && totalW != 0) ? totalW : 1;
   totalH = (isFinite(totalH) && totalH != 0) ? totalH : 1;

Thanks

Owner

lojjic commented Dec 25, 2011

The current master code has a zero-check in place that should theoretically prevent this error from occurring. However, unfortunately I am unable to reproduce the errors you describe using the CSS you provided, even in 1.0beta5, so I cannot verify for certain that your specific problem is fixed.

Would you be able to put together a complete test case (CSS + markup) that throws the error? Thanks.

Appologies for the delay in getting back to you.

It appears to be because the parent element has display: none; on page load (it was a popup box that was initially throwing me errors)

The following throws the error.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <!-- Content Type -->
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title>PIE Test</title>

        <style>
            .wrapper {
                position: fixed;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                z-index: 900;
                display: none;
            }

            .inner {
                position:relative;
                float: left;
                margin-left: -10px;
                width: 620px;
                height: 99px;
                z-index: 20;

                -moz-box-shadow: 0 4px 2px -2px #574e5a;
                -webkit-box-shadow: 0 4px 2px -2px #574e5a;
                box-shadow: 0 4px 2px -2px #574e5a; 

                behavior: url(PIE_uncompressed.htc);
            }
        </style>

    </head>
    <body>
        <div class='wrapper'>
            <div class='inner'>                     
            </div>
        </div>
    </body>
</html>
Owner

lojjic commented May 16, 2012

Can you test this in the 1.0.0 release -- it includes a zero-check that should fix this.

Issue appears to be fixed using version 1.0.0

IE7 no longer throws SCRIPT33426: Arg: Illegal input string in Vector2D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment