I am writing some code that uses HTML5 canvas. Generally it works well, but now I found a very strange behaviour. The weird thing is that it is consistent on different brows
I found this "feature" as well to be a bit irksome. It seems as though you don't want to use CSS to set the width and height properties for the canvas element. Append the canvas element with attributes (rather than CSS) and the dimensions should correct themselves.
var canvas = jQuery("<canvas/>", {
'id' : this.viewId + "canvas"
});
$('#' + this.viewId).attr('height', this.height).attr('width', this.width);