Use onMouseUp event instead of onClick