fixed the condition of click position event