If the code is like as follows, there is no drawing at all for the second canvas. I just removed the first, and it shows:
Your browser does not support the HTML5 canvas tag. ===================================================================================== <canvas id="canvas2" width="200" height="100" style="border:1px solid #c3c3c3;"> Your browser does not support the HTML5 canvas tag. </canvas> <script> var c = document.getElementById("canvas1"); var ctx = c.getContext("2d"); ctx.fillStyle = "#FF0000"; ctx.fillRect(0,0,200,100); var c2 = document.getElementById("canvas2"); var ctx2 = c.getContext("2d"); ctx2.fillStyle = "#FFFF00"; ctx2.fillRect(0,0,200,100); </script> -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to webbrowser-app in Ubuntu. https://bugs.launchpad.net/bugs/1362172 Title: [webapp-container] 2d context drawed to only first one canvas in one page Status in “webbrowser-app” package in Ubuntu: Invalid Bug description: If there is more then one canvas on same page[1], the 2d context can only draw to first canvas element. [1] https://github.com/chihchun/ubuntuwebapp- twocanvas/blob/master/www/index.html#L11 Tested on current build number: 7 device name: mako channel: ubuntu-touch/ubuntu-rtm/14.09-proposed last update: 2014-08-26 11:30:09 version version: 7 version ubuntu: 20140826 version device: 20140811.1 Package version qml-module-qtwebkit:armhf 5.3.0+dfsg-1ubuntu2 qtdeclarative5-ubuntu-web-plugin:armhf 0.23+14.10.20140819.1-0ubuntu1 unity-webapps-qml 0.1+14.10.20140813-0ubuntu1 webapp-container 0.23+14.10.20140819.1-0ubuntu1 webbrowser-app 0.23+14.10.20140819.1-0ubuntu1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1362172/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp