simplify right click check in clickout function