In this post, we will see how to resolve HTML Canvas Eraser and Pen not working as intended
Best Answer:I am not a canvas guy, but looking into the code, found that
ctx.strokeStyle = $('#selColor').val();this is causing issue. Commenting this line worked for me.
If you have better answer, please add a comment about this, thank you!