Fix to canvasOnClickHandler

Fixed canvasOnClickHandler to support bitwise operation