Has anyone had problems with Google Chrome not rendering canvas tags when more than one canvas is used on a page?
I've been having this happen. It occurs in some of my pages, but not others; I'm having a hard time isolating the critical element. When the problem does occur, the behavior is consistent: a particular set of canvas tags (sometimes all canvases on the page) don't render -- they appear as whitespace. It occurs reliably in Chrome / Mac, but does not occur in Firefox / Mac. Interestingly, if I right-click on one of the blank canvases and choose Inspect Element, then suddenly all of the canvases appear. So it really looks like a Chrome bug, as opposed to some error in my code.
The problem can be observed by clicking "Run" in this jsfiddle file:
http://jsfiddle.net/9HbWV/
This page contains two canvas tags, and a script block that draws a rectangle in one of them. In Chrome, the rectangle does not appear. If you un-comment out the last line and re-run, the rectangle does appear. That last line simply invokes getContext() on the other canvas.
I have other, more complex examples where some canvases don't render even if getContext() is called for each canvas. So the problem is not as simple as "getContext must be called at least once for each canvas".