excanvas_r3 in IE, especially in IE8 Standard Mode

148 views
Skip to first unread message

skym

unread,
Apr 16, 2009, 2:15:32 AM4/16/09
to google-excanvas
Hi,
I'm having some trouble using the latest excanvas (excanvas_r3), the
most important problem with Internet Explorer 8.

In IE8 the canvas is not showing at all when I'm adding a proper
DOCTYPE in the html. The same thing happens in IE6 and IE7 if I'm not
using a small script I found in this discussion group to fix the
dimensions. Fixing the canvas dimension does not help IE8 though.
Removing the DOCTYPE makes excanvas in IE8 work like in IE6 or IE7
with the canvas dimensions fix.

Another smaller problem is related to the dynamically generated canvas
in IE8 quirksmode (no DOCTYPE), IE6 and IE7 with dimensions fix: the
latest command does not seem to execute. It's ok if the canvas is in
html.

I have the html i'm using for these tests at http://swf.ro/sabin/tmp/excanvas/index.html

I am using IE Tester for IE6 and IE7 if it's important to mention.


Thanks!
Sabin

goo...@petskink.net

unread,
Apr 16, 2009, 1:37:43 PM4/16/09
to google-excanvas
Try adding

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

to your <head> element.

We did this for http://www.steepancheap.com and it seems to work.


On Apr 16, 12:15 am, skym <skym1...@gmail.com> wrote:
> Hi,
> I'm having some trouble using the latest excanvas (excanvas_r3), the
> most important problem with Internet Explorer 8.
>
> In IE8 the canvas is not showing at all when I'm adding a proper
> DOCTYPE in the html. The same thing happens in IE6 and IE7 if I'm not
> using a small script I found in this discussion group to fix the
> dimensions. Fixing the canvas dimension does not help IE8 though.
> Removing the DOCTYPE makes excanvas in IE8 work like in IE6 or IE7
> with the canvas dimensions fix.
>
> Another smaller problem is related to the dynamically generated canvas
> in IE8 quirksmode (no DOCTYPE), IE6 and IE7 with dimensions fix: the
> latest command does not seem to execute. It's ok if the canvas is in
> html.
>
> I have the html i'm using for these tests athttp://swf.ro/sabin/tmp/excanvas/index.html

Erik Arvidsson

unread,
Apr 16, 2009, 4:09:54 PM4/16/09
to google-...@googlegroups.com
No, don't do that.

I think I know how to fix this but I haven't had time to actually do it yet.

The problem is (I believe) that we need to add quotes around the
filter CSS property in standards mode.
--
erik

skym

unread,
Apr 17, 2009, 1:49:01 AM4/17/09
to google-excanvas
Thanks for the replies!

The IE7 tip does work but it's not really an option for me, since I am
using excanvas for a free Javascript application and I can't tell my
users that they must use the <meta> header for their sites. I guess I
have to wait then for a new release or try to solve the problem on my
own editing excanvas.

What about the second problem? When using excanvas on a dynamically
generated canvas (createElement) the last canvas command does not seem
to execute, e.g. in my example with the boxes only the red box is
shown, if I swap the last lines of code, the blue box is shown only.


On Apr 16, 11:09 pm, Erik Arvidsson <erik.arvids...@gmail.com> wrote:
> No, don't do that.
>
> I think I know how to fix this but I haven't had time to actually do it yet.
>
> The problem is (I believe) that we need to add quotes around the
> filter CSS property in standards mode.
>
>
>
> On Thu, Apr 16, 2009 at 10:37, goo...@petskink.net <goo...@petskink.net> wrote:
>
> > Try adding
>
> > <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
>
> > to your <head> element.
>
> > We did this forhttp://www.steepancheap.comand it seems to work.

Fabien Ménager

unread,
Apr 17, 2009, 4:51:27 AM4/17/09
to google-excanvas
Hello, you must execute any DOM manipulation when the document is
ready :

window.onload = function() {
/// Your code
}

You can also use the facilities offered by the Javascript framework
you use, if any (Prototype.js, jQuery, etc)
See there respective docs to know how to do that.

On Apr 17, 7:49 am, skym <skym1...@gmail.com> wrote:
> Thanks for the replies!
>
> The IE7 tip does work but it's not really an option for me, since I am
> using excanvas for a free Javascript application and I can't tell my
> users that they must use the <meta> header for their sites. I guess I
> have to wait then for a new release or try to solve the problem on my
> own editing excanvas.
>
> What about the second problem? When using excanvas on a dynamically
> generated canvas (createElement) the last canvas command does not seem
> to execute, e.g. in my example with the boxes only the red box is
> shown, if I swap the last lines of code, the blue box is shown only.
>
> On Apr 16, 11:09 pm, Erik Arvidsson <erik.arvids...@gmail.com> wrote:
>
> > No, don't do that.
>
> > I think I know how to fix this but I haven't had time to actually do it yet.
>
> > The problem is (I believe) that we need to add quotes around the
> > filter CSS property in standards mode.
>
> > On Thu, Apr 16, 2009 at 10:37, goo...@petskink.net <goo...@petskink.net> wrote:
>
> > > Try adding
>
> > > <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
>
> > > to your <head> element.
>
> > > We did this forhttp://www.steepancheap.comandit seems to work.

Greg Houston

unread,
Apr 17, 2009, 4:59:38 AM4/17/09
to google-...@googlegroups.com
On Fri, Apr 17, 2009 at 3:51 AM, Fabien Ménager
<fabien....@gmail.com> wrote:
>> What about the second problem? When using excanvas on a dynamically
>> generated canvas (createElement) the last canvas command does not seem
>> to execute, e.g. in my example with the boxes only the red box is
>> shown, if I swap the last lines of code, the blue box is shown only.

I've ran into this as well and just ended up drawing one more
additional shape with it's alpha set to zero.

G.

Fabien Ménager

unread,
Apr 17, 2009, 5:22:29 AM4/17/09
to google-excanvas
You can also make a call to ctx.fill() or ctx.stroke()

On Apr 17, 10:59 am, Greg Houston <gregory.hous...@gmail.com> wrote:
> On Fri, Apr 17, 2009 at 3:51 AM, Fabien Ménager
>
Reply all
Reply to author
Forward
0 new messages