JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>Bug Canvas</title>
</head>
<body>
<canvas id="canvas2" width="222" height="80" style="width:222px; height:80px"/>
<script type="text/javascript">
var canvas2 = document.getElementById('canvas2');
var ctx= canvas2.getContext('2d');
ctx.fillStyle = '#fff000';
ctx.shadowOffsetX = 3;
ctx.shadowOffsetY = 3;
ctx.shadowBlur = 5;
ctx.shadowColor = 'rgba(0,0,0,0.5)';
ctx.fillRect(0,0,222,80)
// There should be a small red rectangle with shadow on top of a yellow rect
ctx.fillStyle = '#FF0000';
ctx.fillRect(0,0,111,80);
</script>
</body>
</html>