Fix #23 click event broken for HTML

I removed the ad hoc and replaced canvas.target for canvas.currentTarget.

I just don't get why there is a division with canvas width and rect width as they are always the same, and the division will always be 1. As HTML elements don't have the width or height attribute, I substituted that division for 1 if the division was NaN. There is no need to check if it is a canvas or not.